@@ -2235,29 +2235,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
22352235 #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
22362236 fn begin_interactive_funding_tx_construction<ES: Deref>(
22372237 &mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
2238- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
2238+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
22392239 ) -> Result<Option<InteractiveTxMessageSend>, APIError>
22402240 where ES::Target: EntropySource
22412241 {
2242- let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2242+ let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
22432243
2244- if let Some(extra_input ) = extra_input {
2245- funding_inputs_with_extra .push(extra_input );
2244+ if let Some(prev_funding_input ) = prev_funding_input {
2245+ funding_inputs .push(prev_funding_input );
22462246 }
22472247
2248- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
2248+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
22492249 // Check that vouts exist for each TxIn in provided transactions.
2250- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
2250+ for (idx, input) in funding_inputs .iter().enumerate() {
22512251 if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
22522252 funding_inputs_prev_outputs.push(output.clone());
22532253 } else {
22542254 return Err(APIError::APIMisuseError {
2255- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
2255+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
22562256 input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
22572257 }
22582258 }
22592259
2260- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
2260+ let total_input_satoshis: u64 = funding_inputs .iter().map(
22612261 |input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
22622262 ).sum();
22632263 if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2312,7 +2312,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
23122312 feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
23132313 is_initiator: self.funding.is_outbound(),
23142314 funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2315- inputs_to_contribute: funding_inputs_with_extra ,
2315+ inputs_to_contribute: funding_inputs ,
23162316 outputs_to_contribute: funding_outputs,
23172317 expected_remote_shared_funding_output,
23182318 };
0 commit comments