@@ -591,7 +591,15 @@ impl_writeable!(ChannelTransactionParameters, 0, {
591
591
is_outbound_from_holder
592
592
} ) ;
593
593
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.
595
603
pub struct DirectedChannelTransactionParameters < ' a > {
596
604
/// The holder's channel static info
597
605
info : & ' a ChannelTransactionParameters ,
@@ -615,7 +623,10 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
615
623
if self . broadcaster_is_holder { self . info . counterparty_selected_contest_delay } else { self . info . holder_selected_contest_delay }
616
624
}
617
625
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.
619
630
pub fn is_outbound ( & self ) -> bool {
620
631
return if self . broadcaster_is_holder { self . info . is_outbound_from_holder } else { !self . info . is_outbound_from_holder } ;
621
632
}
0 commit comments