mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-05 02:11:10 +01:00
routing: prune channels only if both edges are present
We do this to ensure we don't prune too aggressively, as it's possible that we've only received the channel announcement for a channel, but not its accompanying channel updates.
This commit is contained in:
@@ -638,7 +638,7 @@ func (r *ChannelRouter) pruneZombieChans() error {
|
||||
// If *both* edges haven't been updated for a period of
|
||||
// chanExpiry, then we'll mark the channel itself as eligible
|
||||
// for graph pruning.
|
||||
e1Zombie, e2Zombie := true, true
|
||||
var e1Zombie, e2Zombie bool
|
||||
if e1 != nil {
|
||||
e1Zombie = time.Since(e1.LastUpdate) >= chanExpiry
|
||||
if e1Zombie {
|
||||
|
||||
Reference in New Issue
Block a user