rust-lightning/lightning-background-processor
Elias Rohrer 84412ccabb
OutputSweeper: Delay pruning until monitors have likely been archived
Previously, we would prune tracked descriptors once we see a spend hit
`ANTI_REORG_DELAY = 6` confirmations. However, this could lead to a
scenario where lingering `ChannelMonitor`s waiting to be archived would
still regenerate and replay `Event::SpendableOutput`s, i.e., we would
re-add the same (now unspendable due to be actually being already spent)
outputs again after having intially pruned them.

Here, we therefore keep the tracked descriptors around for longer, in
particular at least `ARCHIVAL_DELAY_BLOCKS + ANTI_REORG_DELAY = 4038`
confirmations, at which point we assume the lingering monitors to have
been likely archived, and it's 'safe' for us to also forget about the
descriptors.
2025-01-27 09:56:14 +01:00
..
src OutputSweeper: Delay pruning until monitors have likely been archived 2025-01-27 09:56:14 +01:00
Cargo.toml Re-add optional std feature dependencies to fix RGS and BP builds 2024-09-18 09:07:58 +02:00