]> git.bitcoin.ninja Git - rust-lightning/commit
Process background events when taking the total_consistency_lock
authorMatt Corallo <git@bluematt.me>
Thu, 6 Apr 2023 19:56:01 +0000 (19:56 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 30 May 2023 23:05:02 +0000 (23:05 +0000)
commite5070c488090476ed61910316dd13fb45a58f442
tree083d58ec9c4f14ab7205fa059fd9e8fcd9e4f431
parentacbe41abe28b9434bbadc2216e4ed5847f753a76
Process background events when taking the total_consistency_lock

When we generated a `ChannelMonitorUpdate` during `ChannelManager`
deserialization, we must ensure that it gets processed before any
other `ChannelMonitorUpdate`s. The obvious hook for this is when
taking the `total_consistency_lock`, which makes it unlikely we'll
regress by forgetting this.

Here we add that call in the `PersistenceNotifierGuard`, with a
test-only atomic bool to test that this criteria is met.
lightning/src/ln/channelmanager.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/ln/reorg_tests.rs