Revert "don't broadcast-gossip other peer when adding a connection"

while we consider how to fix it properly.

This reverts commit cbb2ad018d.
This commit is contained in:
Bryan Boreham committed 2015-12-16 13:46:37 +00:00
1 parent f09d87c112
commit cbaa92dcb2
1 file changed
+3 -3
+3 -3
View File
@@ -157,7 +157,7 @@ func (peer *LocalPeer) handleAddConnection(conn Connection) error {
}
peer.router.Routes.Recalculate()
peer.broadcastPeerUpdate()
peer.broadcastPeerUpdate(conn.Remote())
return nil
}
@@ -199,13 +199,13 @@ func (peer *LocalPeer) handleDeleteConnection(conn Connection) {
// helpers
func (peer *LocalPeer) broadcastPeerUpdate() {
func (peer *LocalPeer) broadcastPeerUpdate(peers ...*Peer) {
// Some tests run without a router. This should be fixed so
// that the relevant part of Router can be easily run in the
// context of a test, but that will involve significant
// reworking of tests.
if peer.router != nil {
peer.router.BroadcastTopologyUpdate([]*Peer{peer.Peer})
peer.router.BroadcastTopologyUpdate(append(peers, peer.Peer))
}
}