]> git.bitcoin.ninja Git - rust-lightning/commit
Track spent `WatchedOutput`s and re-add if unconfirmed
authorElias Rohrer <dev@tnull.de>
Tue, 19 Mar 2024 14:07:27 +0000 (15:07 +0100)
committerElias Rohrer <dev@tnull.de>
Tue, 19 Mar 2024 14:55:28 +0000 (15:55 +0100)
commit2f581104b236eace500d3f8153ee5c5dafa42390
treececaa4866492e58e2a003065c77b6f7d84a78680
parent2c9dbb959d0c16ee97baf70074d0a31a0c0443e8
Track spent `WatchedOutput`s and re-add if unconfirmed

Previously, we would track a spending transaction but wouldn't account
for it being reorged out of the chain, in which case we wouldn't monitor
the `WatchedOutput`s until they'd be reloaded on restart.

Here, we keep any `WatchedOutput`s around until their spends are
sufficiently confirmed and only prune them after `ANTI_REORG_DELAY`.
lightning-transaction-sync/src/common.rs
lightning-transaction-sync/src/electrum.rs
lightning-transaction-sync/src/esplora.rs