Skip to content

Commit e681129

Browse files
committed
f Add comments noting that failures will be added to forward_htlcs
1 parent c6ba5ff commit e681129

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,6 +2548,9 @@ pub struct ChannelManager<
25482548
/// Note that no consistency guarantees are made about the existence of a channel with the
25492549
/// `short_channel_id` here, nor the `short_channel_id` in the `PendingHTLCInfo`!
25502550
///
2551+
/// This will also hold any [`FailHTLC`]s arising from handling [`Self::pending_intercepted_htlcs`] or
2552+
/// [`Self::receive_htlcs`].
2553+
///
25512554
/// See `ChannelManager` struct-level documentation for lock order requirements.
25522555
#[cfg(test)]
25532556
pub(super) forward_htlcs: Mutex<HashMap<u64, Vec<HTLCForwardInfo>>>,
@@ -2556,10 +2559,16 @@ pub struct ChannelManager<
25562559
/// Storage for HTLCs that have been intercepted and bubbled up to the user. We hold them here
25572560
/// until the user tells us what we should do with them.
25582561
///
2562+
/// Note that any failures that may arise from handling these will be pushed to
2563+
/// [`Self::forward_htlcs`] with the previous hop's SCID.
2564+
///
25592565
/// See `ChannelManager` struct-level documentation for lock order requirements.
25602566
pending_intercepted_htlcs: Mutex<HashMap<InterceptId, PendingAddHTLCInfo>>,
25612567
/// Storage for HTLCs that are meant for us.
25622568
///
2569+
/// Note that any failures that may arise from handling these will be pushed to
2570+
/// [`Self::forward_htlcs`] with the previous hop's SCID.
2571+
///
25632572
/// See `ChannelManager` struct-level documentation for lock order requirements.
25642573
#[cfg(test)]
25652574
pub(super) receive_htlcs: Mutex<Vec<HTLCForwardInfo>>,

0 commit comments

Comments
 (0)