@@ -6059,8 +6059,8 @@ where
6059
6059
{
6060
6060
let mut output_index = None;
6061
6061
let expected_spk = funding.get_funding_redeemscript().to_p2wsh();
6062
- for (idx, outp) in signing_session.unsigned_tx().outputs ().enumerate() {
6063
- if outp.script_pubkey() == & expected_spk && outp.value() == funding.get_value_satoshis() {
6062
+ for (idx, outp) in signing_session.unsigned_tx().tx().output.iter ().enumerate() {
6063
+ if outp.script_pubkey == expected_spk && outp.value.to_sat () == funding.get_value_satoshis() {
6064
6064
if output_index.is_some() {
6065
6065
return Err(AbortReason::DuplicateFundingOutput);
6066
6066
}
@@ -6566,14 +6566,6 @@ impl FundingNegotiationContext {
6566
6566
}
6567
6567
}
6568
6568
6569
- let funding_inputs = self
6570
- .our_funding_inputs
6571
- .into_iter()
6572
- .map(|FundingTxInput { utxo, sequence, prevtx }| {
6573
- (TxIn { previous_output: utxo.outpoint, sequence, ..Default::default() }, prevtx)
6574
- })
6575
- .collect();
6576
-
6577
6569
let constructor_args = InteractiveTxConstructorArgs {
6578
6570
entropy_source,
6579
6571
holder_node_id,
@@ -6582,7 +6574,7 @@ impl FundingNegotiationContext {
6582
6574
feerate_sat_per_kw: self.funding_feerate_sat_per_1000_weight,
6583
6575
is_initiator: self.is_initiator,
6584
6576
funding_tx_locktime: self.funding_tx_locktime,
6585
- inputs_to_contribute: funding_inputs ,
6577
+ inputs_to_contribute: self.our_funding_inputs ,
6586
6578
shared_funding_input: self.shared_funding_input,
6587
6579
shared_funding_output: SharedOwnedOutput::new(
6588
6580
shared_funding_output,
@@ -8617,7 +8609,7 @@ where
8617
8609
return Err(APIError::APIMisuseError { err });
8618
8610
};
8619
8611
8620
- let tx = signing_session.unsigned_tx().build_unsigned_tx ();
8612
+ let tx = signing_session.unsigned_tx().tx ();
8621
8613
if funding_txid_signed != tx.compute_txid() {
8622
8614
return Err(APIError::APIMisuseError {
8623
8615
err: "Transaction was malleated prior to signing".to_owned(),
@@ -8629,7 +8621,7 @@ where
8629
8621
let sig = match &self.context.holder_signer {
8630
8622
ChannelSignerType::Ecdsa(signer) => signer.sign_splice_shared_input(
8631
8623
&self.funding.channel_transaction_parameters,
8632
- & tx,
8624
+ tx,
8633
8625
splice_input_index as usize,
8634
8626
&self.context.secp_ctx,
8635
8627
),
@@ -13649,12 +13641,6 @@ where
13649
13641
value: Amount::from_sat(funding.get_value_satoshis()),
13650
13642
script_pubkey: funding.get_funding_redeemscript().to_p2wsh(),
13651
13643
};
13652
- let inputs_to_contribute = our_funding_inputs
13653
- .into_iter()
13654
- .map(|FundingTxInput { utxo, sequence, prevtx }| {
13655
- (TxIn { previous_output: utxo.outpoint, sequence, ..Default::default() }, prevtx)
13656
- })
13657
- .collect();
13658
13644
13659
13645
let interactive_tx_constructor = Some(InteractiveTxConstructor::new(
13660
13646
InteractiveTxConstructorArgs {
@@ -13665,7 +13651,7 @@ where
13665
13651
feerate_sat_per_kw: funding_negotiation_context.funding_feerate_sat_per_1000_weight,
13666
13652
funding_tx_locktime: funding_negotiation_context.funding_tx_locktime,
13667
13653
is_initiator: false,
13668
- inputs_to_contribute,
13654
+ inputs_to_contribute: our_funding_inputs ,
13669
13655
shared_funding_input: None,
13670
13656
shared_funding_output: SharedOwnedOutput::new(shared_funding_output, our_funding_contribution_sats),
13671
13657
outputs_to_contribute: funding_negotiation_context.our_funding_outputs.clone(),
0 commit comments