Skip to content

Commit 9075c1d

Browse files
committed
f monitor_key docs on the newly public function
1 parent 38d3397 commit 9075c1d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lightning/src/util/persist.rs

+9
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,15 @@ where
431431
/// [`io::ErrorKind::NotFound`] variant correctly. For more information, please see the
432432
/// documentation for [`MonitorUpdatingPersister`].
433433
///
434+
/// For `monitor_key`, channel storage keys be the channel's transaction ID and index, or
435+
/// [`OutPoint`], with an underscore `_` between them. For example, given:
436+
///
437+
/// - Transaction ID: `deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef`
438+
/// - Index: `1`
439+
///
440+
/// The correct `monitor_key` would be:
441+
/// `deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1`
442+
///
434443
/// Loading a large number of monitors will be faster if done in parallel. You can use this
435444
/// function to accomplish this. Take care to limit the number of parallel readers.
436445
pub fn read_channel_monitor_with_updates<B: Deref, F: Deref + Clone>(

0 commit comments

Comments
 (0)