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 +952,7 @@ impl Channel {
960
952
961
953
let htlc_redeemscript = chan_utils::get_htlc_redeemscript(&htlc,&keys);
962
954
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));
955
+
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
956
let sighash = Message::from_slice(&bip143::SighashComponents::new(&tx).sighash_all(&tx.input[0],&htlc_redeemscript, htlc.amount_msat / 1000)[..]).unwrap();
965
957
let is_local_tx = PublicKey::from_secret_key(&self.secp_ctx,&our_htlc_key) == keys.a_htlc_key;
returnErr(HandleError{err:"Unable to find a pending HTLC which matched the given payment preimage",action:None});
1149
1141
}else{
1150
1142
panic!("Have an inbound HTLC when not awaiting remote revoke that had a garbage state");
@@ -1268,7 +1260,7 @@ impl Channel {
1268
1260
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
1261
1270
1262
// 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");
1263
+
secp_call!(self.secp_ctx.verify(&local_sighash,&sig,&self.their_funding_pubkey.unwrap()),"Invalid funding_created signature from peer",self.channel_id());
1272
1264
1273
1265
// 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
1324
1333
1325
// 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");
1326
+
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
1508
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");
1509
+
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
1510
1520
1511
if msg.htlc_signatures.len() != local_commitment_tx.1.len(){
1521
1512
returnErr(HandleError{err:"Got wrong number of HTLC signatures from remote",action:None});
returnErr(HandleError{err:"Cannot create commitment tx until channel is fully established",action:None});
@@ -2448,7 +2432,7 @@ impl Channel {
2448
2432
let htlc_tx = self.build_htlc_transaction(&remote_commitment_txid, htlc,false,&remote_keys);
2449
2433
let htlc_redeemscript = chan_utils::get_htlc_redeemscript(&htlc,&remote_keys);
2450
2434
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));
2435
+
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