]> git.bitcoin.ninja Git - rust-lightning/commit
Add storage for `ChannelMonitorUpdate`s in `Channel`s
authorMatt Corallo <git@bluematt.me>
Mon, 19 Dec 2022 20:41:42 +0000 (20:41 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 17 Feb 2023 19:09:28 +0000 (19:09 +0000)
commit34218cc4ee68b825ba8f4f12a93b7b0ed0f9898e
tree6c28e9cb0941be1a58bab9d6f124bd833b6d87e1
parent56f979be3e88957b1adbfd108e1f75692bd364b5
Add storage for `ChannelMonitorUpdate`s in `Channel`s

In order to support fully async `ChannelMonitor` updating, we need
to ensure that we can replay `ChannelMonitorUpdate`s if we shut
down after persisting a `ChannelManager` but without completing a
`ChannelMonitorUpdate` persistence. In order to support that we
(obviously) have to store the `ChannelMonitorUpdate`s in the
`ChannelManager`, which we do here inside the `Channel`.

We do so now because in the coming commits we will start using the
async persistence flow for all updates, and while we won't yet
support fully async monitor updating it's nice to get some of the
foundational structures in place now.
lightning/src/ln/channel.rs