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.
This commit is contained in:
Jim Posen authored and Olaoluwa Osuntokun committed 2017-10-17 22:47:20 -07:00
1 parent 9fd77a6e40
commit ee49cdd103
1 file changed
+6 -4
+6 -4
View File
@@ -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] {