Skip to content

Commit 651e273

Browse files
committed
f fix docs jeff caught
1 parent 686208b commit 651e273

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,11 @@ pub struct ChainParameters {
480480
}
481481

482482
/// Whenever we release the `ChannelManager`'s `total_consistency_lock`, from read mode, it is
483-
/// desirable to notify any listeners on `wait_timeout`/`wait` that new updates are available for
484-
/// persistence. Therefore, this struct is responsible for locking the total consistency lock and,
485-
/// upon going out of scope, sending the aforementioned notification (since the lock being released
486-
/// indicates that the updates are ready for persistence).
483+
/// desirable to notify any listeners on `await_persistable_update_timeout`/
484+
/// `await_persistable_update` that new updates are available for persistence. Therefore, this
485+
/// struct is responsible for locking the total consistency lock and, upon going out of scope,
486+
/// sending the aforementioned notification (since the lock being released indicates that the
487+
/// updates are ready for persistence).
487488
struct PersistenceNotifierGuard<'a> {
488489
persistence_notifier: &'a PersistenceNotifier,
489490
// We hold onto this result so the lock doesn't get released immediately.
@@ -3407,16 +3408,18 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
34073408
}
34083409

34093410
/// Blocks until ChannelManager needs to be persisted or a timeout is reached. It returns a bool
3410-
/// indicating whether persistence is necessary. Only one listener on `wait_timeout` is
3411-
/// guaranteed to be woken up.
3411+
/// indicating whether persistence is necessary. Only one listener on
3412+
/// `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
3413+
/// up.
34123414
/// Note that the feature `allow_wallclock_use` must be enabled to use this function.
34133415
#[cfg(any(test, feature = "allow_wallclock_use"))]
34143416
pub fn await_persistable_update_timeout(&self, max_wait: Duration) -> bool {
34153417
self.persistence_notifier.wait_timeout(max_wait)
34163418
}
34173419

3418-
/// Blocks until ChannelManager needs to be persisted. Only one listener on `wait` is
3419-
/// guaranteed to be woken up.
3420+
/// Blocks until ChannelManager needs to be persisted. Only one listener on
3421+
/// `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
3422+
/// up.
34203423
pub fn await_persistable_update(&self) {
34213424
self.persistence_notifier.wait()
34223425
}
@@ -3669,7 +3672,7 @@ impl<Signer: Sign, M: Deref + Sync + Send, T: Deref + Sync + Send, K: Deref + Sy
36693672
}
36703673

36713674
/// Used to signal to the ChannelManager persister that the manager needs to be re-persisted to
3672-
/// disk/backups, through `wait_timeout` and `wait`.
3675+
/// disk/backups, through `await_persistable_update_timeout` and `await_persistable_update`.
36733676
struct PersistenceNotifier {
36743677
/// Users won't access the persistence_lock directly, but rather wait on its bool using
36753678
/// `wait_timeout` and `wait`.

0 commit comments

Comments
 (0)