]> git.bitcoin.ninja Git - rust-lightning/commit
Add `OutputSweeper` utility persisting and sweeping spendable outputs
authorElias Rohrer <dev@tnull.de>
Fri, 12 Jan 2024 10:36:08 +0000 (11:36 +0100)
committerElias Rohrer <dev@tnull.de>
Thu, 18 Apr 2024 14:20:03 +0000 (16:20 +0200)
commit071337a1f1ba1ce99e39da86ba6fc6dee1280ff1
tree7b7408f80e21ab66e619c3d027529ef842566a0b
parentec956516d1db59d5e667cf3ebec2dc2e08148cdd
Add `OutputSweeper` utility persisting and sweeping spendable outputs

We add a `OutputSweeper` utility that allows to track the state of
spendable output descriptors as emitted by `Event::SpendableOutputs`.

To this end, the `OutputSweeper` persists the necessary information in
our `KVStore` and regularly tries to sweep the spendable outputs,
removing them after reaching threshold confirmations, i.e.,
`ANTI_REORG_DELAY`.
lightning/src/chain/chaininterface.rs
lightning/src/chain/mod.rs
lightning/src/util/mod.rs
lightning/src/util/persist.rs
lightning/src/util/sweep.rs [new file with mode: 0644]