@@ -2242,29 +2242,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2242
2242
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
2243
2243
fn begin_interactive_funding_tx_construction<ES: Deref>(
2244
2244
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
2245
- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
2245
+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
2246
2246
) -> Result<Option<InteractiveTxMessageSend>, APIError>
2247
2247
where ES::Target: EntropySource
2248
2248
{
2249
- let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2249
+ let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2250
2250
2251
- if let Some(extra_input ) = extra_input {
2252
- funding_inputs_with_extra .push(extra_input );
2251
+ if let Some(prev_funding_input ) = prev_funding_input {
2252
+ funding_inputs .push(prev_funding_input );
2253
2253
}
2254
2254
2255
- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
2255
+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
2256
2256
// Check that vouts exist for each TxIn in provided transactions.
2257
- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
2257
+ for (idx, input) in funding_inputs .iter().enumerate() {
2258
2258
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
2259
2259
funding_inputs_prev_outputs.push(output.clone());
2260
2260
} else {
2261
2261
return Err(APIError::APIMisuseError {
2262
- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
2262
+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
2263
2263
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
2264
2264
}
2265
2265
}
2266
2266
2267
- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
2267
+ let total_input_satoshis: u64 = funding_inputs .iter().map(
2268
2268
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
2269
2269
).sum();
2270
2270
if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2319,7 +2319,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2319
2319
feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
2320
2320
is_initiator: self.funding.is_outbound(),
2321
2321
funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2322
- inputs_to_contribute: funding_inputs_with_extra ,
2322
+ inputs_to_contribute: funding_inputs ,
2323
2323
outputs_to_contribute: funding_outputs,
2324
2324
expected_remote_shared_funding_output,
2325
2325
};
0 commit comments