Skip to content

Commit f75c489

Browse files
committed
f - move instead of swap
1 parent ab1d4b5 commit f75c489

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,7 +2949,7 @@ pub(super) struct NegotiatingChannelView<'a>(&'a mut InteractiveTxConstructor);
29492949
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled
29502950
fn begin_interactive_funding_tx_construction<SP: Deref, ES: Deref>(
29512951
funding: &FundingScope, context: &ChannelContext<SP>,
2952-
mut funding_negotiation_context: FundingNegotiationContext, is_splice: bool,
2952+
funding_negotiation_context: FundingNegotiationContext, is_splice: bool,
29532953
signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
29542954
change_destination_opt: Option<ScriptBuf>, shared_funding_input: Option<SharedOwnedInput>,
29552955
) -> Result<InteractiveTxConstructor, AbortReason>
@@ -3004,9 +3004,6 @@ where
30043004
}
30053005
}
30063006

3007-
let mut funding_inputs = Vec::new();
3008-
mem::swap(&mut funding_negotiation_context.our_funding_inputs, &mut funding_inputs);
3009-
30103007
let constructor_args = InteractiveTxConstructorArgs {
30113008
entropy_source,
30123009
holder_node_id,
@@ -3015,7 +3012,7 @@ where
30153012
feerate_sat_per_kw: funding_negotiation_context.funding_feerate_sat_per_1000_weight,
30163013
is_initiator: funding_negotiation_context.is_initiator,
30173014
funding_tx_locktime: funding_negotiation_context.funding_tx_locktime,
3018-
inputs_to_contribute: funding_inputs,
3015+
inputs_to_contribute: funding_negotiation_context.our_funding_inputs,
30193016
shared_funding_input,
30203017
shared_funding_output: SharedOwnedOutput::new(
30213018
shared_funding_output,

0 commit comments

Comments
 (0)