@@ -1684,29 +1684,29 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
1684
1684
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
1685
1685
fn begin_interactive_funding_tx_construction<ES: Deref>(
1686
1686
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
1687
- extra_input : Option<(TxIn, TransactionU16LenLimited)>,
1687
+ prev_funding_input : Option<(TxIn, TransactionU16LenLimited)>,
1688
1688
) -> Result<Option<InteractiveTxMessageSend>, APIError>
1689
1689
where ES::Target: EntropySource
1690
1690
{
1691
- let mut funding_inputs_with_extra = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
1691
+ let mut funding_inputs = self.dual_funding_context.our_funding_inputs.take().unwrap_or_else(|| vec![]);
1692
1692
1693
- if let Some(extra_input ) = extra_input {
1694
- funding_inputs_with_extra .push(extra_input );
1693
+ if let Some(prev_funding_input ) = prev_funding_input {
1694
+ funding_inputs .push(prev_funding_input );
1695
1695
}
1696
1696
1697
- let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs_with_extra .len());
1697
+ let mut funding_inputs_prev_outputs: Vec<TxOut> = Vec::with_capacity(funding_inputs .len());
1698
1698
// Check that vouts exist for each TxIn in provided transactions.
1699
- for (idx, input) in funding_inputs_with_extra .iter().enumerate() {
1699
+ for (idx, input) in funding_inputs .iter().enumerate() {
1700
1700
if let Some(output) = input.1.as_transaction().output.get(input.0.previous_output.vout as usize) {
1701
1701
funding_inputs_prev_outputs.push(output.clone());
1702
1702
} else {
1703
1703
return Err(APIError::APIMisuseError {
1704
- err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs_with_extra [{}]",
1704
+ err: format!("Transaction with txid {} does not have an output with vout of {} corresponding to TxIn at funding_inputs [{}]",
1705
1705
input.1.as_transaction().compute_txid(), input.0.previous_output.vout, idx) });
1706
1706
}
1707
1707
}
1708
1708
1709
- let total_input_satoshis: u64 = funding_inputs_with_extra .iter().map(
1709
+ let total_input_satoshis: u64 = funding_inputs .iter().map(
1710
1710
|input| input.1.as_transaction().output.get(input.0.previous_output.vout as usize).map(|out| out.value.to_sat()).unwrap_or(0)
1711
1711
).sum();
1712
1712
if total_input_satoshis < self.dual_funding_context.our_funding_satoshis {
@@ -1761,7 +1761,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
1761
1761
feerate_sat_per_kw: self.dual_funding_context.funding_feerate_sat_per_1000_weight,
1762
1762
is_initiator: self.context.is_outbound(),
1763
1763
funding_tx_locktime: self.dual_funding_context.funding_tx_locktime,
1764
- inputs_to_contribute: funding_inputs_with_extra ,
1764
+ inputs_to_contribute: funding_inputs ,
1765
1765
outputs_to_contribute: funding_outputs,
1766
1766
expected_remote_shared_funding_output,
1767
1767
};
0 commit comments