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
if commitment_tx.output.len() != redeem_scripts.len(){returnErr(());}
189
190
let commitment_sighash = hash_to_message!(&bip143::SighashComponents::new(&commitment_tx).sighash_all(&commitment_tx.input[0],&channel_funding_redeemscript, channel_value_satoshis)[..]);
190
191
let commitment_sig = secp_ctx.sign(&commitment_sighash,&self.funding_key);
let localtx = LocalCommitmentTransaction::new_missing_local_sig(local_initial_commitment_tx, sig,&PublicKey::from_secret_key(&self.secp_ctx,self.local_keys.funding_key()),self.their_funding_pubkey.as_ref().unwrap());
1424
1432
1425
1433
let remote_keys = self.build_remote_transaction_keys()?;
1426
-
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false,self.feerate_per_kw).0;
1427
-
let remote_signature = self.local_keys.sign_remote_commitment(self.channel_value_satoshis,&self.get_funding_redeemscript(),self.feerate_per_kw,&remote_initial_commitment_tx,&remote_keys,&Vec::new(),self.our_to_self_delay,&self.secp_ctx)
1434
+
let commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false,self.feerate_per_kw);
1435
+
let remote_initial_commitment_tx = commitment_tx.0;
1436
+
let scripts = commitment_tx.3;
1437
+
let remote_signature = self.local_keys.sign_remote_commitment(self.channel_value_satoshis,&self.get_funding_redeemscript(),self.feerate_per_kw,&remote_initial_commitment_tx,&remote_keys,&Vec::new(),self.our_to_self_delay,&self.secp_ctx,&scripts)
1428
1438
.map_err(|_| ChannelError::Close("Failed to get signatures for new commitment_signed"))?.0;
1429
1439
1430
1440
// We sign the "remote" commitment transaction, allowing them to broadcast the tx if they wish.
let local_commitment_txid = local_commitment_tx.0.txid();
1749
1759
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)[..]);
let remote_keys = self.build_remote_transaction_keys()?;
3152
-
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false,self.feerate_per_kw).0;
let res = self.local_keys.sign_remote_commitment(self.channel_value_satoshis,&self.get_funding_redeemscript(), feerate_per_kw,&remote_commitment_tx.0,&remote_keys,&htlcs,self.our_to_self_delay,&self.secp_ctx)
3473
+
let res = self.local_keys.sign_remote_commitment(self.channel_value_satoshis,&self.get_funding_redeemscript(), feerate_per_kw,&remote_commitment_tx.0,&remote_keys,&htlcs,self.our_to_self_delay,&self.secp_ctx,&remote_commitment_tx.3)
3462
3474
.map_err(|_| ChannelError::Close("Failed to get signatures for new commitment_signed"))?;
0 commit comments