From 021979b5dd879ad9908d275d3de9410f75f5a750 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 30 Apr 2024 21:30:26 +0000 Subject: [PATCH] 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lightning/src/chain/chainmonitor.rs b/lightning/src/chain/chainmonitor.rs index 81ba30ffb..8e5670870 100644 --- a/lightning/src/chain/chainmonitor.rs +++ b/lightning/src/chain/chainmonitor.rs @@ -296,6 +296,8 @@ pub struct ChainMonitor Vec<(Txid, u32, Option)> { -- 2.39.5