server: don't immediately add bootstrap peer to set of persistent connections
This commit is contained in:
parent
2526827b6d
commit
b2e1d6988c
20
server.go
20
server.go
@ -690,16 +690,6 @@ func (s *server) peerBootstrapper(numTargetPeers uint32,
|
||||
return
|
||||
}
|
||||
|
||||
// Add bootstrapped peer as persistent to maintain
|
||||
// connectivity even if we have no open channels.
|
||||
targetPub := string(conn.RemotePub().SerializeCompressed())
|
||||
s.mu.Lock()
|
||||
s.persistentPeers[targetPub] = struct{}{}
|
||||
if _, ok := s.persistentPeersBackoff[targetPub]; !ok {
|
||||
s.persistentPeersBackoff[targetPub] = defaultBackoff
|
||||
}
|
||||
s.mu.Unlock()
|
||||
|
||||
s.OutboundPeerConnected(nil, conn)
|
||||
}(addr)
|
||||
}
|
||||
@ -805,16 +795,6 @@ func (s *server) peerBootstrapper(numTargetPeers uint32,
|
||||
return
|
||||
}
|
||||
|
||||
// Add bootstrapped peer as persistent to maintain
|
||||
// connectivity even if we have no open channels.
|
||||
targetPub := string(conn.RemotePub().SerializeCompressed())
|
||||
s.mu.Lock()
|
||||
s.persistentPeers[targetPub] = struct{}{}
|
||||
if _, ok := s.persistentPeersBackoff[targetPub]; !ok {
|
||||
s.persistentPeersBackoff[targetPub] = defaultBackoff
|
||||
}
|
||||
s.mu.Unlock()
|
||||
|
||||
s.OutboundPeerConnected(nil, conn)
|
||||
}(addr)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user