@@ -2035,29 +2035,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
20352035 #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
20362036 fn begin_interactive_funding_tx_construction<ES: Deref>(
20372037 &mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
2038- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
2038+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
20392039 ) -> Result<Option<InteractiveTxMessageSend>, APIError>
20402040 where ES::Target: EntropySource
20412041 {
2042- let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2042+ let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
20432043
2044- if let Some(extra_input ) = extra_input {
2045- funding_inputs_with_extra .push(extra_input );
2044+ if let Some(prev_funding_input ) = prev_funding_input {
2045+ funding_inputs .push(prev_funding_input );
20462046 }
20472047
2048- let mut funding_inputs_prev_outputs: Vec<&TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
2048+ let mut funding_inputs_prev_outputs: Vec<&TxOut> = Vec::with_capacity(funding_inputs .len());
20492049 // Check that vouts exist for each TxIn in provided transactions.
2050- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
2050+ for (idx, input) in funding_inputs .iter().enumerate() {
20512051 if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
20522052 funding_inputs_prev_outputs.push(&output);
20532053 } else {
20542054 return Err(APIError::APIMisuseError {
2055- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
2055+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
20562056 input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
20572057 }
20582058 }
20592059
2060- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
2060+ let total_input_satoshis: u64 = funding_inputs .iter().map(
20612061 |input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
20622062 ).sum();
20632063 if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2112,7 +2112,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
21122112 feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
21132113 is_initiator: self.context.is_outbound(),
21142114 funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2115- inputs_to_contribute: funding_inputs_with_extra ,
2115+ inputs_to_contribute: funding_inputs ,
21162116 outputs_to_contribute: funding_outputs,
21172117 expected_remote_shared_funding_output,
21182118 };
0 commit comments