From ee49cdd103a1f7ed99e34319cce63e983389655d Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Wed, 11 Oct 2017 11:38:45 -0700 Subject: [PATCH] server: Respect the initial_routing_sync feature bit. Only synchronize routing info with peer if they request it by setting the appropriate local feature bit. --- server.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server.go b/server.go index eb64ec2c8..6825e3d71 100644 --- a/server.go +++ b/server.go @@ -1341,10 +1341,12 @@ func (s *server) addPeer(p *peer) { s.wg.Add(1) go s.peerTerminationWatcher(p) - // Once the peer has been added to our indexes, send a message to the - // channel router so we can synchronize our view of the channel graph - // with this new peer. - go s.authGossiper.SynchronizeNode(p.addr.IdentityKey) + if p.theirLocalFeatures.HasFeature(lnwire.InitialRoutingSync) { + // Once the peer has been added to our indexes, send a message to the + // channel router so we can synchronize our view of the channel graph + // with this new peer. + go s.authGossiper.SynchronizeNode(p.addr.IdentityKey) + } // Check if there are listeners waiting for this peer to come online. for _, con := range s.peerConnectedListeners[pubStr] {