You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ln/channel.rs
+27-15Lines changed: 27 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -783,6 +783,8 @@ impl Channel {
783
783
letmut local_htlc_total_msat = 0;
784
784
letmut value_to_self_msat_offset = 0;
785
785
786
+
log_trace!(self,"Building commitment transaction number {} for {}, generated by {} with fee {}...", commitment_number,if local {"us"} else {"remote"},if generated_by_local {"us"} else {"remote"}, feerate_per_kw);
log_trace!(self," ...not including inbound HTLC {} (hash {}) with value {} due to state ({})", htlc.htlc_id, log_bytes!(htlc.payment_hash.0), htlc.amount_msat, state_name);
log_trace!(self," ...not including outbound HTLC {} (hash {}) with value {} due to state ({})", htlc.htlc_id, log_bytes!(htlc.payment_hash.0), htlc.amount_msat, state_name);
let local_commitment_txid = local_commitment_tx.0.txid();
1714
1722
let local_sighash = hash_to_message!(&bip143::SighashComponents::new(&local_commitment_tx.0).sighash_all(&local_commitment_tx.0.input[0],&funding_script,self.channel_value_satoshis)[..]);
1723
+
log_trace!(self,"Checking commitment tx signature {} by key {} against tx {} with redeemscript {}", log_bytes!(msg.signature.serialize_compact()[..]), log_bytes!(self.their_funding_pubkey.unwrap().serialize()), encode::serialize_hex(&local_commitment_tx.0), encode::serialize_hex(&funding_script));
1715
1724
secp_check!(self.secp_ctx.verify(&local_sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid commitment tx signature from peer");
1716
1725
1717
1726
//If channel fee was updated by funder confirm funder can afford the new fee rate when applied to the current local commitment transaction
let htlc_redeemscript = chan_utils::get_htlc_redeemscript(&htlc,&local_keys);
1749
+
log_trace!(self,"Checking HTLC tx signature {} by key {} against tx {} with redeemscript {}", log_bytes!(msg.htlc_signatures[idx].serialize_compact()[..]), log_bytes!(local_keys.b_htlc_key.serialize()), encode::serialize_hex(&htlc_tx), encode::serialize_hex(&htlc_redeemscript));
1740
1750
let htlc_sighash = hash_to_message!(&bip143::SighashComponents::new(&htlc_tx).sighash_all(&htlc_tx.input[0],&htlc_redeemscript, htlc.amount_msat / 1000)[..]);
1741
1751
secp_check!(self.secp_ctx.verify(&htlc_sighash,&msg.htlc_signatures[idx],&local_keys.b_htlc_key),"Invalid HTLC tx signature from peer");
1742
1752
let htlc_sig = if htlc.offered{
@@ -3320,6 +3330,7 @@ impl Channel {
3320
3330
let remote_commitment_txid = remote_commitment_tx.0.txid();
3321
3331
let remote_sighash = hash_to_message!(&bip143::SighashComponents::new(&remote_commitment_tx.0).sighash_all(&remote_commitment_tx.0.input[0],&funding_script,self.channel_value_satoshis)[..]);
3322
3332
let our_sig = self.secp_ctx.sign(&remote_sighash,&self.local_keys.funding_key);
3333
+
log_trace!(self,"Signing remote commitment tx {} with redeemscript {} with pubkey {} -> {}", encode::serialize_hex(&remote_commitment_tx.0), encode::serialize_hex(&funding_script), log_bytes!(PublicKey::from_secret_key(&self.secp_ctx,&self.local_keys.funding_key).serialize()), log_bytes!(our_sig.serialize_compact()[..]));
0 commit comments