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
let funding_script = self.get_funding_redeemscript();
1341
1341
1342
1342
let local_keys = self.build_local_transaction_keys(self.cur_local_commitment_transaction_number)?;
1343
-
let local_initial_commitment_tx = self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false,self.feerate_per_kw).0;
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();
1345
1345
1346
-
// They sign the "local" commitment transaction, allowing us to broadcast the tx if we wish.
1346
+
// They sign the "local" commitment transaction...
1347
1347
secp_call!(self.secp_ctx.verify(&local_sighash,&sig,&self.their_funding_pubkey.unwrap()),"Invalid funding_created signature from peer",self.channel_id());
1348
1348
1349
+
// ...and we sign it, allowing us ot broadcast the tx if we wish
let remote_keys = self.build_remote_transaction_keys()?;
1350
1353
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false,self.feerate_per_kw).0;
1351
1354
let remote_sighash = Message::from_slice(&bip143::SighashComponents::new(&remote_initial_commitment_tx).sighash_all(&remote_initial_commitment_tx.input[0],&funding_script,self.channel_value_satoshis)[..]).unwrap();
1352
1355
1353
1356
// We sign the "remote" commitment transaction, allowing them to broadcast the tx if they wish.
0 commit comments