@@ -1498,7 +1498,8 @@ pub(super) trait InteractivelyFunded<SP: Deref> where SP::Target: SignerProvider
1498
1498
self.dual_funding_context_mut().funding_feerate_sat_per_1000_weight,
1499
1499
holder_node_id, self.context().counterparty_node_id, self.is_initiator(),
1500
1500
self.dual_funding_context_mut().funding_tx_locktime,
1501
- self.dual_funding_context_mut().our_funding_inputs.clone(), funding_outputs,
1501
+ self.dual_funding_context_mut().our_funding_inputs.take().unwrap_or_else(|| vec![]),
1502
+ funding_outputs,
1502
1503
expected_remote_shared_funding_output,
1503
1504
).map_err(|_| APIError::APIMisuseError { err: "Incorrect shared output provided".into() })?;
1504
1505
@@ -3898,7 +3899,7 @@ pub(super) struct DualFundingChannelContext {
3898
3899
/// Note that the `our_funding_satoshis` field is equal to the total value of `our_funding_inputs`
3899
3900
/// minus any fees paid for our contributed weight. This means that change will never be generated
3900
3901
/// and the maximum value possible will go towards funding the channel.
3901
- pub our_funding_inputs: Vec<(TxIn, TransactionU16LenLimited)>,
3902
+ pub our_funding_inputs: Option< Vec<(TxIn, TransactionU16LenLimited)> >,
3902
3903
}
3903
3904
3904
3905
// Holder designates channel data owned for the benefit of the user client.
@@ -8549,7 +8550,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8549
8550
their_funding_satoshis: None,
8550
8551
funding_tx_locktime,
8551
8552
funding_feerate_sat_per_1000_weight,
8552
- our_funding_inputs: funding_inputs,
8553
+ our_funding_inputs: Some( funding_inputs) ,
8553
8554
},
8554
8555
#[cfg(any(dual_funding, splicing))]
8555
8556
interactive_tx_constructor: None,
@@ -8757,7 +8758,7 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
8757
8758
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
8758
8759
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
8759
8760
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8760
- our_funding_inputs: funding_inputs,
8761
+ our_funding_inputs: Some( funding_inputs) ,
8761
8762
},
8762
8763
interactive_tx_constructor: None,
8763
8764
};
0 commit comments