]> git.bitcoin.ninja Git - rust-lightning/commit
Move Channel's blocked monitor updates vec to an even TLV 2023-07-async-mon-even-tlv
authorMatt Corallo <git@bluematt.me>
Wed, 5 Jul 2023 17:20:48 +0000 (17:20 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 5 Jul 2023 17:26:37 +0000 (17:26 +0000)
commit1ce2beb77455a674888f3e3589723195eaa7b13c
tree01bcdd2057ed8302705429947e34fc0a924f8bad
parent86fd9e7fbc549f1e556063301a22a5bb3bc1f333
Move Channel's blocked monitor updates vec to an even TLV

In 9dfe42cf8681afc9c3f84e0c85a4e2a30c1156a8,
`ChannelMonitorUpdate`s were stored in `Channel` while they were
being processed. Because it was possible (though highly unlikely,
due to various locking likely blocking persistence) an update was
in-flight (even synchronously) when a `ChannelManager` was
persisted, the new updates were persisted via an odd TLV.

However, in 4041f0899f86eaf6a0a4576a91918fa54026ac46 these pending
monitor updates were moved to `ChannelManager`, with appropriate
handling there. Now the only `ChannelMonitorUpdate`s which are
stored in `Channel` are those which are explicitly blocked, which
requires the async pipeline.

Because we don't support async monitor update users downgrading to
0.0.115 or lower, we move to persisting them via an even TLV. As
the odd TLV storage has not yet been released, we can do so
trivially.

Fixes #2317.
lightning/src/ln/channel.rs