Skip to content

Commit 027dd4d

Browse files
committed
f Reference BIP 146/147 and clarify/fix spelling in comment
1 parent 3be038d commit 027dd4d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ pub struct LocalCommitmentTransaction {
502502
/// The HTLCs and remote htlc signatures which were included in this commitment transaction.
503503
///
504504
/// Note that this includes all HTLCs, including ones which were considered dust and not
505-
/// acually included in the transaction as it appears on-chain, but who's value factor into fee
506-
/// calculations.
505+
/// actually included in the transaction as it appears on-chain, but who's value is burned as
506+
/// fees and not included in the to_local or to_remote outputs.
507507
///
508508
/// The remote HTLC signatures in the second element will always be set for non-dust HTLCs, ie
509509
/// those for which transaction_output_index.is_some().
@@ -583,7 +583,8 @@ impl LocalCommitmentTransaction {
583583

584584
pub(crate) fn add_local_sig(&self, funding_redeemscript: &Script, our_sig: Signature) -> Transaction {
585585
let mut tx = self.unsigned_tx.clone();
586-
tx.input[0].witness.push(Vec::new()); // First is the multisig dummy
586+
// First push the multisig dummy, note that due to BIP147 (NULLDUMMY) it must be a zero-length element.
587+
tx.input[0].witness.push(Vec::new());
587588

588589
if self.our_sig_first {
589590
tx.input[0].witness.push(our_sig.serialize_der().to_vec());

0 commit comments

Comments
 (0)