@@ -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
@@ -3900,7 +3901,7 @@ pub(super) struct DualFundingChannelContext {
3900
3901
/// Note that the `our_funding_satoshis` field is equal to the total value of `our_funding_inputs`
3901
3902
/// minus any fees paid for our contributed weight. This means that change will never be generated
3902
3903
/// and the maximum value possible will go towards funding the channel.
3903
- pub our_funding_inputs: Vec<(TxIn, TransactionU16LenLimited)>,
3904
+ pub our_funding_inputs: Option< Vec<(TxIn, TransactionU16LenLimited)> >,
3904
3905
}
3905
3906
3906
3907
// Holder designates channel data owned for the benefit of the user client.
@@ -8554,7 +8555,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8554
8555
their_funding_satoshis: None,
8555
8556
funding_tx_locktime,
8556
8557
funding_feerate_sat_per_1000_weight,
8557
- our_funding_inputs: funding_inputs,
8558
+ our_funding_inputs: Some( funding_inputs) ,
8558
8559
},
8559
8560
#[cfg(any(dual_funding, splicing))]
8560
8561
interactive_tx_constructor: None,
@@ -8762,7 +8763,7 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
8762
8763
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
8763
8764
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
8764
8765
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8765
- our_funding_inputs: funding_inputs,
8766
+ our_funding_inputs: Some( funding_inputs) ,
8766
8767
},
8767
8768
interactive_tx_constructor: None,
8768
8769
};
0 commit comments