Merge branch 'master' into 29_unknown_peer

This commit is contained in:
Bryan Boreham committed 2014-09-17 12:59:30 +01:00
commit a25ccbb261
12 files changed
+228 -108

No files matched your search

+2 -2
View File
@@ -105,8 +105,8 @@ func (cache *PeerCache) String() string {
var buf bytes.Buffer
cache.ForEach(func(name PeerName, peer *Peer) {
buf.WriteString(fmt.Sprint(peer, "\n"))
peer.ForEachConnection(func(remoteName PeerName, _ Connection) {
buf.WriteString(fmt.Sprintf(" -> %v\n", remoteName))
peer.ForEachConnection(func(remoteName PeerName, conn Connection) {
buf.WriteString(fmt.Sprintf(" -> %v [%v]\n", remoteName, conn.RemoteTCPAddr()))
})
})
return buf.String()