Skip to content

Commit 710f381

Browse files
committed
Rename extra_input to prev_funding_input
1 parent da31410 commit 710f381

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lightning/src/ln/channel.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,29 +2243,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
22432243
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
22442244
fn begin_interactive_funding_tx_construction<ES: Deref>(
22452245
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
2246-
extra_input: Option<(TxIn, TransactionU16LenLimited)>,
2246+
prev_funding_input: Option<(TxIn, TransactionU16LenLimited)>,
22472247
) -> Result<Option<InteractiveTxMessageSend>, APIError>
22482248
where ES::Target: EntropySource
22492249
{
2250-
let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2250+
let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
22512251

2252-
if let Some(extra_input) = extra_input {
2253-
funding_inputs_with_extra.push(extra_input);
2252+
if let Some(prev_funding_input) = prev_funding_input {
2253+
funding_inputs.push(prev_funding_input);
22542254
}
22552255

2256-
let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra.len());
2256+
let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs.len());
22572257
// Check that vouts exist for each TxIn in provided transactions.
2258-
for (idx, input) in funding_inputs_with_extra.iter().enumerate() {
2258+
for (idx, input) in funding_inputs.iter().enumerate() {
22592259
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
22602260
funding_inputs_prev_outputs.push(output.clone());
22612261
} else {
22622262
return Err(APIError::APIMisuseError {
2263-
err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra[{}]",
2263+
err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs[{}]",
22642264
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
22652265
}
22662266
}
22672267

2268-
let total_input_satoshis: u64 = funding_inputs_with_extra.iter().map(
2268+
let total_input_satoshis: u64 = funding_inputs.iter().map(
22692269
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
22702270
).sum();
22712271
if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2320,7 +2320,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
23202320
feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
23212321
is_initiator: self.funding.is_outbound(),
23222322
funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2323-
inputs_to_contribute: funding_inputs_with_extra,
2323+
inputs_to_contribute: funding_inputs,
23242324
outputs_to_contribute: funding_outputs,
23252325
expected_remote_shared_funding_output,
23262326
};

0 commit comments

Comments
 (0)