@@ -1692,29 +1692,29 @@ pub(super) trait InteractivelyFunded<SP: Deref> where SP::Target: SignerProvider
16921692 #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
16931693 fn begin_interactive_funding_tx_construction<ES: Deref>(
16941694 &mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
1695- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
1695+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
16961696 ) -> Result<Option<InteractiveTxMessageSend>, APIError>
16971697 where ES::Target: EntropySource
16981698 {
1699- let mut funding_inputs_with_extra = self.dual_funding_context_mut().our_funding_inputs.take().unwrap_or_else(|| vec![]);
1699+ let mut funding_inputs = self.dual_funding_context_mut().our_funding_inputs.take().unwrap_or_else(|| vec![]);
17001700
1701- if let Some(extra_input ) = extra_input {
1702- funding_inputs_with_extra .push(extra_input );
1701+ if let Some(prev_funding_input ) = prev_funding_input {
1702+ funding_inputs .push(prev_funding_input );
17031703 }
17041704
1705- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
1705+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
17061706 // Check that vouts exist for each TxIn in provided transactions.
1707- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
1707+ for (idx, input) in funding_inputs .iter().enumerate() {
17081708 if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
17091709 funding_inputs_prev_outputs.push(output.clone());
17101710 } else {
17111711 return Err(APIError::APIMisuseError {
1712- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
1712+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
17131713 input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
17141714 }
17151715 }
17161716
1717- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
1717+ let total_input_satoshis: u64 = funding_inputs .iter().map(
17181718 |input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
17191719 ).sum();
17201720 if total_input_satoshis < self.dual_funding_context().our_funding_satoshis {
@@ -1769,7 +1769,7 @@ pub(super) trait InteractivelyFunded<SP: Deref> where SP::Target: SignerProvider
17691769 feerate_sat_per_kw: self.dual_funding_context_mut().funding_feerate_sat_per_1000_weight,
17701770 is_initiator: self.is_initiator(),
17711771 funding_tx_locktime: self.dual_funding_context_mut().funding_tx_locktime,
1772- inputs_to_contribute: funding_inputs_with_extra ,
1772+ inputs_to_contribute: funding_inputs ,
17731773 outputs_to_contribute: funding_outputs,
17741774 expected_remote_shared_funding_output,
17751775 };
0 commit comments