]> git.bitcoin.ninja Git - rust-lightning/commit
Run monitor update completion actions for pre-startup completion
authorMatt Corallo <git@bluematt.me>
Wed, 5 Jul 2023 02:15:42 +0000 (02:15 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 12 Jul 2023 20:53:10 +0000 (20:53 +0000)
commitf9521a4bdaa4cfdaf08f6797d1a84e96475c9f49
tree99ef73521e46f56d5c4ec612cf825ff943e35423
parentd450e0fb2c73d4310bf63aaac6fbf5217cc9bf27
Run monitor update completion actions for pre-startup completion

If a `ChannelMonitorUpdate` completes being persisted, but the
`ChannelManager` isn't informed thereof (or isn't persisted) before
shutdown, on startup we may still have it listed as in-flight. When
we compare the available `ChannelMonitor` with the in-flight set,
we'll notice it completed and remove it, however this may leave
some post-update actions dangling which need to complete.

Here we handle this with a new `BackgroundEvent` indicating we need
to handle any post-update action(s) for a given channel.
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs