Store pending claims awaiting monitor update in a separate map
authorMatt Corallo <git@bluematt.me>
Tue, 6 Dec 2022 18:33:52 +0000 (18:33 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 8 Dec 2022 19:52:28 +0000 (19:52 +0000)
commit27e59ef01a2e68499d3cbfee135a49f0579f64dc
tree6a5383dc5534af58a5ebdce7e76c90bd693283cf
parent8c8bb6d246a53f1a0e4fc70788eb59947352fcb9
Store pending claims awaiting monitor update in a separate map

In the next commits we'll move to generating `PaymentClaimed`
events while handling `ChannelMonitorUpdate`s rather than directly
in line. Thus, as a prerequisite, here we move to storing the info
required to generate the `PaymentClaimed` event in a separate map.

Note that while this does introduce a new map which is written as
an even value which users cannot opt out of, the map is only filled
in when users use the asynchronous `ChannelMonitor` updates and
after a future PR. As these are still considered beta, breaking
downgrades for such users is considered acceptable in the future PR
(which will likely be one LDK version later).
lightning/src/ln/channelmanager.rs