@@ -2035,29 +2035,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2035
2035
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
2036
2036
fn begin_interactive_funding_tx_construction<ES: Deref>(
2037
2037
&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)>,
2039
2039
) -> Result<Option<InteractiveTxMessageSend>, APIError>
2040
2040
where ES::Target: EntropySource
2041
2041
{
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![]);
2043
2043
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 );
2046
2046
}
2047
2047
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());
2049
2049
// 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() {
2051
2051
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
2052
2052
funding_inputs_prev_outputs.push(&output);
2053
2053
} else {
2054
2054
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 [{}]",
2056
2056
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
2057
2057
}
2058
2058
}
2059
2059
2060
- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
2060
+ let total_input_satoshis: u64 = funding_inputs .iter().map(
2061
2061
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
2062
2062
).sum();
2063
2063
if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2112,7 +2112,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2112
2112
feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
2113
2113
is_initiator: self.context.is_outbound(),
2114
2114
funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2115
- inputs_to_contribute: funding_inputs_with_extra ,
2115
+ inputs_to_contribute: funding_inputs ,
2116
2116
outputs_to_contribute: funding_outputs,
2117
2117
expected_remote_shared_funding_output,
2118
2118
};
0 commit comments