Handle `BackgroundEvent`s replaying non-closing monitor updates
authorMatt Corallo <git@bluematt.me>
Wed, 10 May 2023 05:39:26 +0000 (05:39 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 30 May 2023 23:00:59 +0000 (23:00 +0000)
commitacbe41abe28b9434bbadc2216e4ed5847f753a76
tree86f4f337a511163483369137a18870c44d8d0d93
parenta2989129a79a150e12115c490d361fc701755c75
Handle `BackgroundEvent`s replaying non-closing monitor updates

`BackgroundEvent` was used to store `ChannelMonitorUpdate`s which
result in a channel force-close, avoiding relying on
`ChannelMonitor`s having been loaded while `ChannelManager`
block-connection methods are called during startup.

In the coming commit(s) we'll also generate non-channel-closing
`ChannelMonitorUpdate`s during startup, which will need to be
replayed prior to any other `ChannelMonitorUpdate`s generated from
normal operation.

In the next commit we'll handle that by handling `BackgroundEvent`s
immediately after locking the `total_consistency_lock`.
lightning/src/ln/channelmanager.rs