@@ -1702,29 +1702,29 @@ pub(super) trait InteractivelyFunded<SP: Deref> where SP::Target: SignerProvider
1702
1702
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
1703
1703
fn begin_interactive_funding_tx_construction<ES: Deref>(
1704
1704
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
1705
- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
1705
+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
1706
1706
) -> Result<Option<InteractiveTxMessageSend>, APIError>
1707
1707
where ES::Target: EntropySource
1708
1708
{
1709
- let mut funding_inputs_with_extra = self.dual_funding_context_mut().our_funding_inputs.take().unwrap_or_else(|| vec![]);
1709
+ let mut funding_inputs = self.dual_funding_context_mut().our_funding_inputs.take().unwrap_or_else(|| vec![]);
1710
1710
1711
- if let Some(extra_input ) = extra_input {
1712
- funding_inputs_with_extra .push(extra_input );
1711
+ if let Some(prev_funding_input ) = prev_funding_input {
1712
+ funding_inputs .push(prev_funding_input );
1713
1713
}
1714
1714
1715
- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
1715
+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
1716
1716
// Check that vouts exist for each TxIn in provided transactions.
1717
- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
1717
+ for (idx, input) in funding_inputs .iter().enumerate() {
1718
1718
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
1719
1719
funding_inputs_prev_outputs.push(output.clone());
1720
1720
} else {
1721
1721
return Err(APIError::APIMisuseError {
1722
- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
1722
+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
1723
1723
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
1724
1724
}
1725
1725
}
1726
1726
1727
- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
1727
+ let total_input_satoshis: u64 = funding_inputs .iter().map(
1728
1728
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
1729
1729
).sum();
1730
1730
if total_input_satoshis < self.dual_funding_context().our_funding_satoshis {
@@ -1779,7 +1779,7 @@ pub(super) trait InteractivelyFunded<SP: Deref> where SP::Target: SignerProvider
1779
1779
feerate_sat_per_kw: self.dual_funding_context_mut().funding_feerate_sat_per_1000_weight,
1780
1780
is_initiator: self.is_initiator(),
1781
1781
funding_tx_locktime: self.dual_funding_context_mut().funding_tx_locktime,
1782
- inputs_to_contribute: funding_inputs_with_extra ,
1782
+ inputs_to_contribute: funding_inputs ,
1783
1783
outputs_to_contribute: funding_outputs,
1784
1784
expected_remote_shared_funding_output,
1785
1785
};
0 commit comments