mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 06:21:40 +01:00
server: upon disconnect, prune peer query state from gossiper
This commit is contained in:
parent
199bbe2fd4
commit
d7b21859d5
1 changed files with 4 additions and 0 deletions
|
@ -1305,6 +1305,10 @@ func (s *server) peerTerminationWatcher(p *peer) {
|
||||||
// available for use.
|
// available for use.
|
||||||
s.fundingMgr.CancelPeerReservations(p.PubKey())
|
s.fundingMgr.CancelPeerReservations(p.PubKey())
|
||||||
|
|
||||||
|
// We'll also inform the gossiper that this peer is no longer active,
|
||||||
|
// so we don't need to maintain sync state for it any longer.
|
||||||
|
s.authGossiper.PruneSyncState(p.addr.IdentityKey)
|
||||||
|
|
||||||
// Tell the switch to remove all links associated with this peer.
|
// Tell the switch to remove all links associated with this peer.
|
||||||
// Passing nil as the target link indicates that all links associated
|
// Passing nil as the target link indicates that all links associated
|
||||||
// with this interface should be closed.
|
// with this interface should be closed.
|
||||||
|
|
Loading…
Add table
Reference in a new issue