Skip to content

Commit 7d4f3d5

Browse files
committed
fixup! docs
1 parent 78c1b4a commit 7d4f3d5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,15 @@ impl_writeable!(ChannelTransactionParameters, 0, {
591591
is_outbound_from_holder
592592
});
593593

594-
/// Static channel fields used to build transactions given per-commitment fields (CommitmentTransaction)
594+
/// Static channel fields used to build transactions given per-commitment fields (CommitmentTransaction).
595+
///
596+
/// If holder is the broadcaster, we map structure elements
597+
/// (holder_pubkeys, counterparty_pubkeys, counterparty_selected_contest_delay) to
598+
/// (broadcaster_pubkeys, countersignatory_pubkeys, contest_delay). If the counterparty is the
599+
/// broadcaster, the parties are swapped in the above mapping.
600+
///
601+
/// This structure makes transaction fields (as consumed by CommitmentTransaction) independent of
602+
/// transaction ownership.
595603
pub struct DirectedChannelTransactionParameters<'a> {
596604
/// The holder's channel static info
597605
info: &'a ChannelTransactionParameters,
@@ -615,7 +623,10 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
615623
if self.broadcaster_is_holder { self.info.counterparty_selected_contest_delay } else { self.info.holder_selected_contest_delay }
616624
}
617625

618-
/// Whether the channel is outbound from the broadcaster
626+
/// Whether the channel is outbound from the broadcaster.
627+
///
628+
/// The boolean representing the side that initiated the channel is
629+
/// an input to the commitment number obscure factor computation.
619630
pub fn is_outbound(&self) -> bool {
620631
return if self.broadcaster_is_holder { self.info.is_outbound_from_holder } else { !self.info.is_outbound_from_holder };
621632
}

0 commit comments

Comments
 (0)