Skip to content

Commit ffd803b

Browse files
committed
Update monitor update cleanup docs
1 parent 975c284 commit ffd803b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning/src/util/persist.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,10 @@ where
347347
///
348348
/// # Pruning stale channel updates
349349
///
350-
/// Stale updates are pruned when a full monitor is written. The old monitor is first read, and if
351-
/// that succeeds, updates in the range between the old and new monitors are deleted. The `lazy`
352-
/// flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions
350+
/// Stale updates are pruned when consolidation threshold is reached according to `maximum_pending_updates`.
351+
/// Monitor updates in the range between the latest `update_id` and `update_id - maximum_pending_updates`
352+
/// are deleted.
353+
/// The `lazy` flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions
353354
/// will complete. However, stale updates are not a problem for data integrity, since updates are
354355
/// only read that are higher than the stored [`ChannelMonitor`]'s `update_id`.
355356
///

0 commit comments

Comments
 (0)