@@ -2215,29 +2215,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2215
2215
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
2216
2216
pub fn begin_interactive_funding_tx_construction<ES: Deref>(
2217
2217
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
2218
- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
2218
+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
2219
2219
) -> Result<Option<InteractiveTxMessageSend>, APIError>
2220
2220
where ES::Target: EntropySource
2221
2221
{
2222
- let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2222
+ let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2223
2223
2224
- if let Some(extra_input ) = extra_input {
2225
- funding_inputs_with_extra .push(extra_input );
2224
+ if let Some(prev_funding_input ) = prev_funding_input {
2225
+ funding_inputs .push(prev_funding_input );
2226
2226
}
2227
2227
2228
- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
2228
+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
2229
2229
// Check that vouts exist for each TxIn in provided transactions.
2230
- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
2230
+ for (idx, input) in funding_inputs .iter().enumerate() {
2231
2231
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
2232
2232
funding_inputs_prev_outputs.push(output.clone());
2233
2233
} else {
2234
2234
return Err(APIError::APIMisuseError {
2235
- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
2235
+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
2236
2236
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
2237
2237
}
2238
2238
}
2239
2239
2240
- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
2240
+ let total_input_satoshis: u64 = funding_inputs .iter().map(
2241
2241
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
2242
2242
).sum();
2243
2243
if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2292,7 +2292,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2292
2292
feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
2293
2293
is_initiator: self.context.is_outbound(),
2294
2294
funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2295
- inputs_to_contribute: funding_inputs_with_extra ,
2295
+ inputs_to_contribute: funding_inputs ,
2296
2296
outputs_to_contribute: funding_outputs,
2297
2297
expected_remote_shared_funding_output,
2298
2298
};
0 commit comments