@@ -2448,7 +2448,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2448
2448
debug_assert!(self.interactive_tx_constructor.is_none());
2449
2449
2450
2450
let mut funding_inputs = Vec::new();
2451
- mem::swap(&mut self.dual_funding_context .our_funding_inputs, &mut funding_inputs);
2451
+ mem::swap(&mut self.funding_negotiation_context .our_funding_inputs, &mut funding_inputs);
2452
2452
2453
2453
// TODO(splicing): Add prev funding tx as input, must be provided as a parameter
2454
2454
@@ -2466,7 +2466,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2466
2466
if self.funding.is_outbound() {
2467
2467
funding_outputs.push(
2468
2468
OutputOwned::Shared(SharedOwnedOutput::new(
2469
- shared_funding_output, self.dual_funding_context .our_funding_satoshis,
2469
+ shared_funding_output, self.funding_negotiation_context .our_funding_satoshis,
2470
2470
))
2471
2471
);
2472
2472
} else {
@@ -2482,9 +2482,9 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2482
2482
.map_err(|_err| AbortReason::InternalError("Error getting destination script"))?
2483
2483
};
2484
2484
let change_value_opt = calculate_change_output_value(
2485
- self.funding.is_outbound(), self.dual_funding_context .our_funding_satoshis,
2485
+ self.funding.is_outbound(), self.funding_negotiation_context .our_funding_satoshis,
2486
2486
&funding_inputs, &funding_outputs,
2487
- self.dual_funding_context .funding_feerate_sat_per_1000_weight,
2487
+ self.funding_negotiation_context .funding_feerate_sat_per_1000_weight,
2488
2488
change_script.minimal_non_dust().to_sat(),
2489
2489
)?;
2490
2490
if let Some(change_value) = change_value_opt {
@@ -2493,7 +2493,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2493
2493
script_pubkey: change_script,
2494
2494
};
2495
2495
let change_output_weight = get_output_weight(&change_output.script_pubkey).to_wu();
2496
- let change_output_fee = fee_for_weight(self.dual_funding_context .funding_feerate_sat_per_1000_weight, change_output_weight);
2496
+ let change_output_fee = fee_for_weight(self.funding_negotiation_context .funding_feerate_sat_per_1000_weight, change_output_weight);
2497
2497
let change_value_decreased_with_fee = change_value.saturating_sub(change_output_fee);
2498
2498
// Check dust limit again
2499
2499
if change_value_decreased_with_fee > self.context.holder_dust_limit_satoshis {
@@ -2507,9 +2507,9 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2507
2507
holder_node_id,
2508
2508
counterparty_node_id: self.context.counterparty_node_id,
2509
2509
channel_id: self.context.channel_id(),
2510
- feerate_sat_per_kw: self.dual_funding_context .funding_feerate_sat_per_1000_weight,
2510
+ feerate_sat_per_kw: self.funding_negotiation_context .funding_feerate_sat_per_1000_weight,
2511
2511
is_initiator: self.funding.is_outbound(),
2512
- funding_tx_locktime: self.dual_funding_context .funding_tx_locktime,
2512
+ funding_tx_locktime: self.funding_negotiation_context .funding_tx_locktime,
2513
2513
inputs_to_contribute: funding_inputs,
2514
2514
outputs_to_contribute: funding_outputs,
2515
2515
expected_remote_shared_funding_output,
@@ -2594,7 +2594,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2594
2594
where
2595
2595
L::Target: Logger
2596
2596
{
2597
- let our_funding_satoshis = self.dual_funding_context .our_funding_satoshis;
2597
+ let our_funding_satoshis = self.funding_negotiation_context .our_funding_satoshis;
2598
2598
let transaction_number = self.unfunded_context.transaction_number();
2599
2599
2600
2600
let mut output_index = None;
@@ -5136,8 +5136,8 @@ fn check_v2_funding_inputs_sufficient(
5136
5136
}
5137
5137
}
5138
5138
5139
- /// Context for dual-funded channels.
5140
- pub(super) struct DualFundingChannelContext {
5139
+ /// Context for negotiating channels ( dual-funded V2 open, splicing)
5140
+ pub(super) struct FundingNegotiationContext {
5141
5141
/// The amount in satoshis we will be contributing to the channel.
5142
5142
pub our_funding_satoshis: u64,
5143
5143
/// The amount in satoshis our counterparty will be contributing to the channel.
@@ -10323,7 +10323,7 @@ pub(super) struct PendingV2Channel<SP: Deref> where SP::Target: SignerProvider {
10323
10323
pub funding: FundingScope,
10324
10324
pub context: ChannelContext<SP>,
10325
10325
pub unfunded_context: UnfundedChannelContext,
10326
- pub dual_funding_context: DualFundingChannelContext ,
10326
+ pub funding_negotiation_context: FundingNegotiationContext ,
10327
10327
/// The current interactive transaction construction session under negotiation.
10328
10328
pub interactive_tx_constructor: Option<InteractiveTxConstructor>,
10329
10329
/// The signing session created after `tx_complete` handling
@@ -10382,7 +10382,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10382
10382
unfunded_channel_age_ticks: 0,
10383
10383
holder_commitment_point: HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
10384
10384
};
10385
- let dual_funding_context = DualFundingChannelContext {
10385
+ let funding_negotiation_context = FundingNegotiationContext {
10386
10386
our_funding_satoshis: funding_satoshis,
10387
10387
// TODO(dual_funding) TODO(splicing) Include counterparty contribution, once that's enabled
10388
10388
their_funding_satoshis: None,
@@ -10394,7 +10394,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10394
10394
funding,
10395
10395
context,
10396
10396
unfunded_context,
10397
- dual_funding_context ,
10397
+ funding_negotiation_context ,
10398
10398
interactive_tx_constructor: None,
10399
10399
interactive_tx_signing_session: None,
10400
10400
};
@@ -10463,7 +10463,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10463
10463
},
10464
10464
funding_feerate_sat_per_1000_weight: self.context.feerate_per_kw,
10465
10465
second_per_commitment_point,
10466
- locktime: self.dual_funding_context .funding_tx_locktime.to_consensus_u32(),
10466
+ locktime: self.funding_negotiation_context .funding_tx_locktime.to_consensus_u32(),
10467
10467
require_confirmed_inputs: None,
10468
10468
}
10469
10469
}
@@ -10534,7 +10534,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10534
10534
&funding.get_counterparty_pubkeys().revocation_basepoint);
10535
10535
context.channel_id = channel_id;
10536
10536
10537
- let dual_funding_context = DualFundingChannelContext {
10537
+ let funding_negotiation_context = FundingNegotiationContext {
10538
10538
our_funding_satoshis: our_funding_satoshis,
10539
10539
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
10540
10540
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
@@ -10548,8 +10548,8 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10548
10548
holder_node_id,
10549
10549
counterparty_node_id,
10550
10550
channel_id: context.channel_id,
10551
- feerate_sat_per_kw: dual_funding_context .funding_feerate_sat_per_1000_weight,
10552
- funding_tx_locktime: dual_funding_context .funding_tx_locktime,
10551
+ feerate_sat_per_kw: funding_negotiation_context .funding_feerate_sat_per_1000_weight,
10552
+ funding_tx_locktime: funding_negotiation_context .funding_tx_locktime,
10553
10553
is_initiator: false,
10554
10554
inputs_to_contribute: our_funding_inputs,
10555
10555
outputs_to_contribute: Vec::new(),
@@ -10567,7 +10567,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10567
10567
Ok(Self {
10568
10568
funding,
10569
10569
context,
10570
- dual_funding_context ,
10570
+ funding_negotiation_context ,
10571
10571
interactive_tx_constructor,
10572
10572
interactive_tx_signing_session: None,
10573
10573
unfunded_context,
@@ -10632,7 +10632,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
10632
10632
}),
10633
10633
channel_type: Some(self.funding.get_channel_type().clone()),
10634
10634
},
10635
- funding_satoshis: self.dual_funding_context .our_funding_satoshis,
10635
+ funding_satoshis: self.funding_negotiation_context .our_funding_satoshis,
10636
10636
second_per_commitment_point,
10637
10637
require_confirmed_inputs: None,
10638
10638
}
0 commit comments