Skip to content

Commit b128e01

Browse files
committed
f update docs on block action
1 parent ed407c3 commit b128e01

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
@@ -534,7 +534,14 @@ pub(crate) enum MonitorUpdateCompletionAction {
534534
/// this payment. Note that this is only best-effort. On restart it's possible such a duplicate
535535
/// event can be generated.
536536
PaymentClaimed { payment_hash: PaymentHash },
537-
/// Indicates an [`events::Event`] should be surfaced to the user.
537+
/// Indicates an [`events::Event`] should be surfaced to the user and possibly resume the
538+
/// operation of another channel.
539+
///
540+
/// This is usually generated when we've forwarded an HTLC and want to block the outbound edge
541+
/// from completing a monitor update which removes the payment preimage until the inbound edge
542+
/// completes a monitor update containing the payment preimage. In that case, after the inbound
543+
/// edge completes, we will surface an [`Event::PaymentForwarded`] as well as unblock the
544+
/// outbound edge.
538545
EmitEventAndFreeOtherChannel {
539546
event: events::Event,
540547
downstream_counterparty_and_funding_outpoint: Option<(PublicKey, OutPoint, RAAMonitorUpdateBlockingAction)>,
@@ -1040,6 +1047,8 @@ where
10401047
/// Thus, we place them here to be handled as soon as possible once we are running normally.
10411048
///
10421049
/// See `ChannelManager` struct-level documentation for lock order requirements.
1050+
///
1051+
/// [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
10431052
pending_background_events: Mutex<Vec<BackgroundEvent>>,
10441053
/// Used when we have to take a BIG lock to make sure everything is self-consistent.
10451054
/// Essentially just when we're serializing ourselves out.

0 commit comments

Comments
 (0)