mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
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:
parent
9fd77a6e40
commit
ee49cdd103
1 changed files with 6 additions and 4 deletions
10
server.go
10
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] {
|
||||
|
|
Loading…
Add table
Reference in a new issue