Skip to content

Commit 73ee120

Browse files
committed
f update docs on block action
1 parent 7202bb7 commit 73ee120

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,14 @@ pub(crate) enum MonitorUpdateCompletionAction {
532532
/// this payment. Note that this is only best-effort. On restart it's possible such a duplicate
533533
/// event can be generated.
534534
PaymentClaimed { payment_hash: PaymentHash },
535-
/// Indicates an [`events::Event`] should be surfaced to the user.
535+
/// Indicates an [`events::Event`] should be surfaced to the user and possibly resume the
536+
/// operation of another channel.
537+
///
538+
/// This is usually generated when we've forwarded an HTLC and want to block the outbound edge
539+
/// from completing a monitor update which removes the payment preimage until the inbound edge
540+
/// completes a monitor update containing the payment preimage. In that case, after the inbound
541+
/// edge completes, we will surface an [`Event::PaymentForwarded`] as well as unblock the
542+
/// outbound edge.
536543
EmitEventAndFreeOtherChannel {
537544
event: events::Event,
538545
downstream_counterparty_and_funding_outpoint: Option<(PublicKey, OutPoint, RAAMonitorUpdateBlockingAction)>,
@@ -1038,6 +1045,8 @@ where
10381045
/// Thus, we place them here to be handled as soon as possible once we are running normally.
10391046
///
10401047
/// See `ChannelManager` struct-level documentation for lock order requirements.
1048+
///
1049+
/// [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
10411050
pending_background_events: Mutex<Vec<BackgroundEvent>>,
10421051
/// Used when we have to take a BIG lock to make sure everything is self-consistent.
10431052
/// Essentially just when we're serializing ourselves out.

0 commit comments

Comments
 (0)