From: Matt Corallo Date: Mon, 3 Apr 2023 20:11:30 +0000 (+0000) Subject: Don't immediately exit BP if `ChannelManager` is persistable X-Git-Tag: v0.0.115~37^2~4 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=8676c5aa4e18086bf56a21966de01f173b6b6983;p=rust-lightning Don't immediately exit BP if `ChannelManager` is persistable If `ChannelManager` is persistable before the async background processor even starts, it may not even get around to overwriting the `should_exit` flag before testing it, and the default value is (incorrectly) true, causing an immediate unconditional exit. The default value should simply be false. Fixes #2140 --- diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index c30e5ad66..3dd099b49 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -518,7 +518,7 @@ where UMH::Target: 'static + CustomMessageHandler, PS::Target: 'static + Persister<'a, CW, T, ES, NS, SP, F, R, L, SC>, { - let mut should_break = true; + let mut should_break = false; let async_event_handler = |event| { let network_graph = gossip_sync.network_graph(); let event_handler = &event_handler;