]> git.bitcoin.ninja Git - rust-lightning/commit
Wake `background-processor` from `ChainMonitor` on new blocks 2024-04-notify-bp-on-blocks
authorMatt Corallo <git@bluematt.me>
Tue, 30 Apr 2024 21:30:26 +0000 (21:30 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 1 May 2024 19:42:24 +0000 (19:42 +0000)
commit021979b5dd879ad9908d275d3de9410f75f5a750
treeb493cd7e5354b7ff1114d551e3ddc1a9aa511648
parent2b14cc40a6acf226aafaddd0efe67264c0df706f
Wake `background-processor` from `ChainMonitor` on new blocks

When we receive a new block we may generate
`Event::SpendableOutputs` in `ChannelMonitor`s which then need to
be processed by the background processor. While it will do so
eventually when its normal loop goes around, this may cause user
tests to be delayed in finding events, so we should notify the BP
immediately to wake it on new blocks.

We implement that here, unconditionally notifying the
`background-processor` whenever we receive a new block or confirmed
transactions.
lightning/src/chain/chainmonitor.rs