Remove all references to PeerName in ConnectionMaker

This commit is contained in:
Bryan Boreham committed 2014-09-08 15:05:50 +01:00
1 parent 8b3e97b96a
commit dec794eb72
5 files changed
+33 -34

No files matched your search

+3 -2
View File
@@ -110,10 +110,11 @@ func (peer *Peer) SetVersionAndConnections(version uint64, connections map[PeerN
peer.version = version
peer.connections = connections
for remoteName, conn := range connections {
peer.Router.ConnectionMaker.EnsureConnection(remoteName, conn.RemoteTCPAddr())
if remoteName != peer.Router.Ourself.Name {
peer.Router.ConnectionMaker.EnsureConnection(conn.RemoteTCPAddr())
}
}
}
func (peer *Peer) Forward(dstPeer *Peer, df bool, frame []byte, dec *EthernetDecoder) error {
return peer.Relay(peer, dstPeer, df, frame, dec)
}