]> git.bitcoin.ninja Git - rust-lightning/commit
Remove and track perm failed nodes & channels
authorDuncan Dean <duncangleeddean@gmail.com>
Fri, 26 Aug 2022 10:54:16 +0000 (12:54 +0200)
committerDuncan Dean <duncangleeddean@gmail.com>
Fri, 7 Oct 2022 10:00:39 +0000 (12:00 +0200)
commit63d7b2bf3e4038781fed262c9cf198c430812351
treeaecbb6e3d7b19c7ab4620817d6223e42520587c8
parent7544030bb63fee6484fc178bb2ac8f382fe3b5b1
Remove and track perm failed nodes & channels

We never had the `NetworkGraph::node_failed` method implemented. The
scorer now handles non-permanent failures by downgrading nodes, so we
don't want that implemented.

The method is renamed to `node_failed_permanent` to explicitly indicate
that this is the only case it handles. We also add tracking in the form
of two maps as fields of `NetworkGraph`, namely, `removed_nodes` and
`removed_channels`. We track these removed graph entries to ensure we
don't just resync them right away from gossip soon after removing them.
We stop tracking these removed nodes whenever `remove_stale_channels_and_tracking()`
is called and the entries have been tracked for longer than
`REMOVED_ENTRIES_TRACKING_AGE_LIMIT_SECS` which is currently set to one
week.
lightning-background-processor/src/lib.rs
lightning/src/routing/gossip.rs