Skip to content

Commit 29451bf

Browse files
committed
Doc Clarity: Handling gaps in persisted ChannelMonitorUpdates
If there are any gaps in the persisted [`ChannelMonitorUpdate`]s, implementer can safely ignore [`ChannelMonitorUpdate`]s after the gap and load without them. Since, acc. to channel-manager, we have only made progress if all contiguos ChannelMonitorUpdates have been persisted.
1 parent 5e41425 commit 29451bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ pub trait Persist<ChannelSigner: WriteableEcdsaChannelSigner> {
176176
/// If an implementer chooses to persist the updates only, they need to make
177177
/// sure that all the updates are applied to the `ChannelMonitors` *before*
178178
/// the set of channel monitors is given to the `ChannelManager`
179-
/// deserialization routine. See [`ChannelMonitor::update_monitor`] for
179+
/// deserialization routine. If there are any gaps in the persisted [`ChannelMonitorUpdate`]s,
180+
/// implementer can safely ignore [`ChannelMonitorUpdate`]s after the gap and load without them.
181+
/// See [`ChannelMonitor::update_monitor`] for
180182
/// applying a monitor update to a monitor. If full `ChannelMonitors` are
181183
/// persisted, then there is no need to persist individual updates.
182184
///

0 commit comments

Comments
 (0)