Skip to content

Commit 9ff6f29

Browse files
committed
Add comment noting that ChannelMonitor events are serialized
1 parent 0ebf70d commit 9ff6f29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning/src/ln/channelmonitor.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,11 @@ impl<R: ::std::io::Read> Readable<R> for ChannelMonitorUpdateStep {
783783
///
784784
/// You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date
785785
/// information and are actively monitoring the chain.
786+
///
787+
/// Pending Events or updated HTLCs which have not yet been read out by
788+
/// get_and_clear_pending_htlcs_updated or get_and_clear_pending_events are serialized to disk and
789+
/// reloaded at deserialize-time. Thus, you must ensure that, when handling events, all events
790+
/// gotten are fully handled before re-serializing the new state.
786791
pub struct ChannelMonitor<ChanSigner: ChannelKeys> {
787792
latest_update_id: u64,
788793
commitment_transaction_number_obscure_factor: u64,

0 commit comments

Comments
 (0)