Skip to content

Commit

Permalink
f update docs about fallibility on reading monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
domZippilli committed Sep 26, 2023
1 parent 9075c1d commit cddc8e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lightning/src/util/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@ where
/// ## EXTREMELY IMPORTANT
///
/// It is extremely important that your [`KVStore::read`] implementation uses the
/// [`io::ErrorKind::NotFound`] variant correctly: that is, when a file is not found, and _only_
/// in that circumstance (not when there is really a permissions error, for example). This is
/// because this function does not list updates. Instead, it reads the monitor, and using its
/// stored `update_id`, synthesizes update storage keys, and tries them in sequence until one is
/// not found. All _other_ errors will be bubbled up in this function's [`io::Result`].
/// [`io::ErrorKind::NotFound`] variant correctly: that is, when a file is not found, and _only_ in
/// that circumstance (not when there is really a permissions error, for example). This is because
/// neither channel monitor reading function lists updates. Instead, either reads the monitor, and
/// using its stored `update_id`, synthesizes update storage keys, and tries them in sequence until
/// one is not found. All _other_ errors will be bubbled up in the function's [`Result`].
///
/// # Pruning stale channel updates
///
Expand Down

0 comments on commit cddc8e7

Please sign in to comment.