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
/// Gets the redeemscript for the funding transaction output (ie the funding transaction output
@@ -960,7 +959,7 @@ impl Channel {
960
959
961
960
let htlc_redeemscript = chan_utils::get_htlc_redeemscript(&htlc,&keys);
962
961
963
-
let our_htlc_key = secp_derived_key!(chan_utils::derive_private_key(&self.secp_ctx,&keys.per_commitment_point,&self.local_keys.htlc_base_key));
962
+
let our_htlc_key = secp_derived_key!(chan_utils::derive_private_key(&self.secp_ctx,&keys.per_commitment_point,&self.local_keys.htlc_base_key),self.channel_id());
964
963
let sighash = Message::from_slice(&bip143::SighashComponents::new(&tx).sighash_all(&tx.input[0],&htlc_redeemscript, htlc.amount_msat / 1000)[..]).unwrap();
965
964
let is_local_tx = PublicKey::from_secret_key(&self.secp_ctx,&our_htlc_key) == keys.a_htlc_key;
let local_sighash = Message::from_slice(&bip143::SighashComponents::new(&local_initial_commitment_tx).sighash_all(&local_initial_commitment_tx.input[0],&funding_script,self.channel_value_satoshis)[..]).unwrap();
1269
1268
1270
1269
// They sign the "local" commitment transaction, allowing us to broadcast the tx if we wish.
1271
-
secp_call!(self.secp_ctx.verify(&local_sighash,&sig,&self.their_funding_pubkey.unwrap()),"Invalid funding_created signature from peer");
1270
+
secp_call!(self.secp_ctx.verify(&local_sighash,&sig,&self.their_funding_pubkey.unwrap()),"Invalid funding_created signature from peer",self.channel_id());
1272
1271
1273
1272
// We sign the "remote" commitment transaction, allowing them to broadcast the tx if they wish.
let local_sighash = Message::from_slice(&bip143::SighashComponents::new(&local_initial_commitment_tx).sighash_all(&local_initial_commitment_tx.input[0],&funding_script,self.channel_value_satoshis)[..]).unwrap();
1332
1331
1333
1332
// They sign the "local" commitment transaction, allowing us to broadcast the tx if we wish.
1334
-
secp_call!(self.secp_ctx.verify(&local_sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid funding_signed signature from peer");
1333
+
secp_call!(self.secp_ctx.verify(&local_sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid funding_signed signature from peer",self.channel_id());
let local_commitment_txid = local_commitment_tx.0.txid();
1517
1516
let local_sighash = Message::from_slice(&bip143::SighashComponents::new(&local_commitment_tx.0).sighash_all(&local_commitment_tx.0.input[0],&funding_script,self.channel_value_satoshis)[..]).unwrap();
1518
-
secp_call!(self.secp_ctx.verify(&local_sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid commitment tx signature from peer");
1517
+
secp_call!(self.secp_ctx.verify(&local_sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid commitment tx signature from peer",self.channel_id());
1519
1518
1520
1519
if msg.htlc_signatures.len() != local_commitment_tx.1.len(){
1521
1520
returnErr(HandleError{err:"Got wrong number of HTLC signatures from remote",action:None});
secp_call!(self.secp_ctx.verify(&sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid closing tx signature from peer");
1895
+
secp_call!(self.secp_ctx.verify(&sighash,&msg.signature,&self.their_funding_pubkey.unwrap()),"Invalid closing tx signature from peer",self.channel_id());
1897
1896
},
1898
1897
};
1899
1898
@@ -2448,7 +2447,7 @@ impl Channel {
2448
2447
let htlc_tx = self.build_htlc_transaction(&remote_commitment_txid, htlc,false,&remote_keys);
2449
2448
let htlc_redeemscript = chan_utils::get_htlc_redeemscript(&htlc,&remote_keys);
2450
2449
let htlc_sighash = Message::from_slice(&bip143::SighashComponents::new(&htlc_tx).sighash_all(&htlc_tx.input[0],&htlc_redeemscript, htlc.amount_msat / 1000)[..]).unwrap();
2451
-
let our_htlc_key = secp_derived_key!(chan_utils::derive_private_key(&self.secp_ctx,&remote_keys.per_commitment_point,&self.local_keys.htlc_base_key));
2450
+
let our_htlc_key = secp_derived_key!(chan_utils::derive_private_key(&self.secp_ctx,&remote_keys.per_commitment_point,&self.local_keys.htlc_base_key),self.channel_id());
0 commit comments