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();
847
847
848
-
let remote_keys = try!(self.build_remote_transaction_keys());
849
-
let remote_initial_commitment_tx = try!(self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false)).0;
848
+
let remote_keys = self.build_remote_transaction_keys()?;
849
+
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false)?.0;
850
850
let remote_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&remote_initial_commitment_tx).sighash_all(&remote_initial_commitment_tx,0,&funding_script,self.channel_value_satoshis)[..]));
851
851
852
-
let local_keys = try!(self.build_local_transaction_keys(self.cur_local_commitment_transaction_number));
853
-
let local_initial_commitment_tx = try!(self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false)).0;
852
+
let local_keys = self.build_local_transaction_keys(self.cur_local_commitment_transaction_number)?;
853
+
let local_initial_commitment_tx = self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false)?.0;
854
854
let local_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&local_initial_commitment_tx).sighash_all(&local_initial_commitment_tx,0,&funding_script,self.channel_value_satoshis)[..]));
855
855
856
856
// They sign the "local" commitment transaction, allowing us to broadcast the tx if we wish.
@@ -911,8 +911,8 @@ impl Channel {
911
911
912
912
let funding_script = self.get_funding_redeemscript();
913
913
914
-
let local_keys = try!(self.build_local_transaction_keys(self.cur_local_commitment_transaction_number));
915
-
let local_initial_commitment_tx = try!(self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false)).0;
914
+
let local_keys = self.build_local_transaction_keys(self.cur_local_commitment_transaction_number)?;
915
+
let local_initial_commitment_tx = self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false)?.0;
916
916
let local_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&local_initial_commitment_tx).sighash_all(&local_initial_commitment_tx,0,&funding_script,self.channel_value_satoshis)[..]));
917
917
918
918
// They sign the "local" commitment transaction, allowing us to broadcast the tx if we wish.
@@ -1061,7 +1061,7 @@ impl Channel {
1061
1061
//TODO: Need to examine the type of err - if its a fee issue or similar we may want to
1062
1062
//fail it back the route, if its a temporary issue we can ignore it...
let funding_script = self.get_funding_redeemscript();
1158
1158
1159
-
let local_keys = try!(self.build_local_transaction_keys(self.cur_local_commitment_transaction_number));
1160
-
let local_commitment_tx = try!(self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false));
1159
+
let local_keys = self.build_local_transaction_keys(self.cur_local_commitment_transaction_number)?;
1160
+
let local_commitment_tx = self.build_commitment_transaction(self.cur_local_commitment_transaction_number,&local_keys,true,false)?;
1161
1161
let local_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&local_commitment_tx.0).sighash_all(&local_commitment_tx.0,0,&funding_script,self.channel_value_satoshis)[..]));
let funding_script = self.get_funding_redeemscript();
1455
1455
1456
-
let remote_keys = try!(self.build_remote_transaction_keys());
1457
-
let remote_initial_commitment_tx = try!(self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false)).0;
1456
+
let remote_keys = self.build_remote_transaction_keys()?;
1457
+
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false)?.0;
1458
1458
let remote_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&remote_initial_commitment_tx).sighash_all(&remote_initial_commitment_tx,0,&funding_script,self.channel_value_satoshis)[..]));
1459
1459
1460
1460
// We sign the "remote" commitment transaction, allowing them to broadcast the tx if they wish.
@@ -1615,15 +1615,15 @@ impl Channel {
1615
1615
1616
1616
let funding_script = self.get_funding_redeemscript();
1617
1617
1618
-
let remote_keys = try!(self.build_remote_transaction_keys());
1619
-
let remote_commitment_tx = try!(self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,true));
1618
+
let remote_keys = self.build_remote_transaction_keys()?;
1619
+
let remote_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,true)?;
1620
1620
let remote_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&remote_commitment_tx.0).sighash_all(&remote_commitment_tx.0,0,&funding_script,self.channel_value_satoshis)[..]));
1621
1621
let our_sig = secp_call!(self.secp_ctx.sign(&remote_sighash,&self.local_keys.funding_key));
1622
1622
1623
1623
letmut htlc_sigs = Vec::new();
1624
1624
1625
1625
forref htlc in remote_commitment_tx.1.iter(){
1626
-
let htlc_tx = try!(self.build_htlc_transaction(&remote_commitment_tx.0.txid(), htlc,false,&remote_keys));
1626
+
let htlc_tx = self.build_htlc_transaction(&remote_commitment_tx.0.txid(), htlc,false,&remote_keys)?;
1627
1627
let htlc_redeemscript = chan_utils::get_htlc_redeemscript(&htlc,&remote_keys, htlc.offered);
1628
1628
let htlc_sighash = secp_call!(Message::from_slice(&bip143::SighashComponents::new(&htlc_tx).sighash_all(&htlc_tx,0,&htlc_redeemscript, htlc.amount_msat / 1000)[..]));
1629
1629
let our_htlc_key = secp_call!(chan_utils::derive_private_key(&self.secp_ctx,&remote_keys.per_commitment_point,&self.local_keys.htlc_base_key));
@@ -1645,9 +1645,9 @@ impl Channel {
1645
1645
/// Shorthand for calling send_htlc() followed by send_commitment(), see docs on those for
0 commit comments