Skip to content

Commit

Permalink
Update monitor update cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
G8XSU committed Dec 8, 2023
1 parent 975c284 commit ffd803b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lightning/src/util/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,10 @@ where
///
/// # Pruning stale channel updates
///
/// Stale updates are pruned when a full monitor is written. The old monitor is first read, and if
/// that succeeds, updates in the range between the old and new monitors are deleted. The `lazy`
/// flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions
/// Stale updates are pruned when consolidation threshold is reached according to `maximum_pending_updates`.
/// Monitor updates in the range between the latest `update_id` and `update_id - maximum_pending_updates`
/// are deleted.
/// The `lazy` flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions
/// will complete. However, stale updates are not a problem for data integrity, since updates are
/// only read that are higher than the stored [`ChannelMonitor`]'s `update_id`.
///
Expand Down

0 comments on commit ffd803b

Please sign in to comment.