@@ -2132,29 +2132,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2132
2132
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
2133
2133
fn begin_interactive_funding_tx_construction<ES: Deref>(
2134
2134
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
2135
- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
2135
+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
2136
2136
) -> Result<Option<InteractiveTxMessageSend>, APIError>
2137
2137
where ES::Target: EntropySource
2138
2138
{
2139
- let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2139
+ let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
2140
2140
2141
- if let Some(extra_input ) = extra_input {
2142
- funding_inputs_with_extra .push(extra_input );
2141
+ if let Some(prev_funding_input ) = prev_funding_input {
2142
+ funding_inputs .push(prev_funding_input );
2143
2143
}
2144
2144
2145
- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
2145
+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
2146
2146
// Check that vouts exist for each TxIn in provided transactions.
2147
- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
2147
+ for (idx, input) in funding_inputs .iter().enumerate() {
2148
2148
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
2149
2149
funding_inputs_prev_outputs.push(output.clone());
2150
2150
} else {
2151
2151
return Err(APIError::APIMisuseError {
2152
- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
2152
+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
2153
2153
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
2154
2154
}
2155
2155
}
2156
2156
2157
- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
2157
+ let total_input_satoshis: u64 = funding_inputs .iter().map(
2158
2158
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
2159
2159
).sum();
2160
2160
if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -2209,7 +2209,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2209
2209
feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
2210
2210
is_initiator: self.context.is_outbound(),
2211
2211
funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
2212
- inputs_to_contribute: funding_inputs_with_extra ,
2212
+ inputs_to_contribute: funding_inputs ,
2213
2213
outputs_to_contribute: funding_outputs,
2214
2214
expected_remote_shared_funding_output,
2215
2215
};
0 commit comments