@@ -2772,7 +2772,7 @@ where
2772
2772
debug_assert!(self.interactive_tx_constructor.is_none());
2773
2773
2774
2774
let mut funding_inputs = Vec::new();
2775
- mem::swap(&mut self.dual_funding_context .our_funding_inputs, &mut funding_inputs);
2775
+ mem::swap(&mut self.funding_negotiation_context .our_funding_inputs, &mut funding_inputs);
2776
2776
2777
2777
// TODO(splicing): Add prev funding tx as input, must be provided as a parameter
2778
2778
@@ -2794,10 +2794,10 @@ where
2794
2794
.map_err(|_err| AbortReason::InternalError("Error getting destination script"))?
2795
2795
};
2796
2796
let change_value_opt = calculate_change_output_value(
2797
- self.funding.is_outbound(), self.dual_funding_context .our_funding_satoshis,
2797
+ self.funding.is_outbound(), self.funding_negotiation_context .our_funding_satoshis,
2798
2798
&funding_inputs, None,
2799
2799
&shared_funding_output.script_pubkey, &funding_outputs,
2800
- self.dual_funding_context .funding_feerate_sat_per_1000_weight,
2800
+ self.funding_negotiation_context .funding_feerate_sat_per_1000_weight,
2801
2801
change_script.minimal_non_dust().to_sat(),
2802
2802
)?;
2803
2803
if let Some(change_value) = change_value_opt {
@@ -2806,7 +2806,7 @@ where
2806
2806
script_pubkey: change_script,
2807
2807
};
2808
2808
let change_output_weight = get_output_weight(&change_output.script_pubkey).to_wu();
2809
- let change_output_fee = fee_for_weight(self.dual_funding_context .funding_feerate_sat_per_1000_weight, change_output_weight);
2809
+ let change_output_fee = fee_for_weight(self.funding_negotiation_context .funding_feerate_sat_per_1000_weight, change_output_weight);
2810
2810
let change_value_decreased_with_fee = change_value.saturating_sub(change_output_fee);
2811
2811
// Check dust limit again
2812
2812
if change_value_decreased_with_fee > self.context.holder_dust_limit_satoshis {
@@ -2820,12 +2820,12 @@ where
2820
2820
holder_node_id,
2821
2821
counterparty_node_id: self.context.counterparty_node_id,
2822
2822
channel_id: self.context.channel_id(),
2823
- feerate_sat_per_kw: self.dual_funding_context .funding_feerate_sat_per_1000_weight,
2823
+ feerate_sat_per_kw: self.funding_negotiation_context .funding_feerate_sat_per_1000_weight,
2824
2824
is_initiator: self.funding.is_outbound(),
2825
- funding_tx_locktime: self.dual_funding_context .funding_tx_locktime,
2825
+ funding_tx_locktime: self.funding_negotiation_context .funding_tx_locktime,
2826
2826
inputs_to_contribute: funding_inputs,
2827
2827
shared_funding_input: None,
2828
- shared_funding_output: SharedOwnedOutput::new(shared_funding_output, self.dual_funding_context .our_funding_satoshis),
2828
+ shared_funding_output: SharedOwnedOutput::new(shared_funding_output, self.funding_negotiation_context .our_funding_satoshis),
2829
2829
outputs_to_contribute: funding_outputs,
2830
2830
};
2831
2831
let mut tx_constructor = InteractiveTxConstructor::new(constructor_args)?;
@@ -2915,7 +2915,7 @@ where
2915
2915
where
2916
2916
L::Target: Logger
2917
2917
{
2918
- let our_funding_satoshis = self.dual_funding_context .our_funding_satoshis;
2918
+ let our_funding_satoshis = self.funding_negotiation_context .our_funding_satoshis;
2919
2919
let transaction_number = self.unfunded_context.transaction_number();
2920
2920
2921
2921
let mut output_index = None;
@@ -5853,8 +5853,8 @@ fn check_v2_funding_inputs_sufficient(
5853
5853
}
5854
5854
}
5855
5855
5856
- /// Context for dual-funded channels.
5857
- pub(super) struct DualFundingChannelContext {
5856
+ /// Context for negotiating channels ( dual-funded V2 open, splicing)
5857
+ pub(super) struct FundingNegotiationContext {
5858
5858
/// The amount in satoshis we will be contributing to the channel.
5859
5859
pub our_funding_satoshis: u64,
5860
5860
/// The amount in satoshis our counterparty will be contributing to the channel.
@@ -12021,7 +12021,7 @@ where
12021
12021
pub funding: FundingScope,
12022
12022
pub context: ChannelContext<SP>,
12023
12023
pub unfunded_context: UnfundedChannelContext,
12024
- pub dual_funding_context: DualFundingChannelContext ,
12024
+ pub funding_negotiation_context: FundingNegotiationContext ,
12025
12025
/// The current interactive transaction construction session under negotiation.
12026
12026
pub interactive_tx_constructor: Option<InteractiveTxConstructor>,
12027
12027
/// The signing session created after `tx_complete` handling
@@ -12084,7 +12084,7 @@ where
12084
12084
unfunded_channel_age_ticks: 0,
12085
12085
holder_commitment_point: HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12086
12086
};
12087
- let dual_funding_context = DualFundingChannelContext {
12087
+ let funding_negotiation_context = FundingNegotiationContext {
12088
12088
our_funding_satoshis: funding_satoshis,
12089
12089
// TODO(dual_funding) TODO(splicing) Include counterparty contribution, once that's enabled
12090
12090
their_funding_satoshis: None,
@@ -12096,7 +12096,7 @@ where
12096
12096
funding,
12097
12097
context,
12098
12098
unfunded_context,
12099
- dual_funding_context ,
12099
+ funding_negotiation_context ,
12100
12100
interactive_tx_constructor: None,
12101
12101
interactive_tx_signing_session: None,
12102
12102
};
@@ -12172,7 +12172,7 @@ where
12172
12172
},
12173
12173
funding_feerate_sat_per_1000_weight: self.context.feerate_per_kw,
12174
12174
second_per_commitment_point,
12175
- locktime: self.dual_funding_context .funding_tx_locktime.to_consensus_u32(),
12175
+ locktime: self.funding_negotiation_context .funding_tx_locktime.to_consensus_u32(),
12176
12176
require_confirmed_inputs: None,
12177
12177
}
12178
12178
}
@@ -12238,7 +12238,7 @@ where
12238
12238
&funding.get_counterparty_pubkeys().revocation_basepoint);
12239
12239
context.channel_id = channel_id;
12240
12240
12241
- let dual_funding_context = DualFundingChannelContext {
12241
+ let funding_negotiation_context = FundingNegotiationContext {
12242
12242
our_funding_satoshis: our_funding_satoshis,
12243
12243
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
12244
12244
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
@@ -12256,8 +12256,8 @@ where
12256
12256
holder_node_id,
12257
12257
counterparty_node_id,
12258
12258
channel_id: context.channel_id,
12259
- feerate_sat_per_kw: dual_funding_context .funding_feerate_sat_per_1000_weight,
12260
- funding_tx_locktime: dual_funding_context .funding_tx_locktime,
12259
+ feerate_sat_per_kw: funding_negotiation_context .funding_feerate_sat_per_1000_weight,
12260
+ funding_tx_locktime: funding_negotiation_context .funding_tx_locktime,
12261
12261
is_initiator: false,
12262
12262
inputs_to_contribute: our_funding_inputs,
12263
12263
shared_funding_input: None,
@@ -12276,7 +12276,7 @@ where
12276
12276
Ok(Self {
12277
12277
funding,
12278
12278
context,
12279
- dual_funding_context ,
12279
+ funding_negotiation_context ,
12280
12280
interactive_tx_constructor,
12281
12281
interactive_tx_signing_session: None,
12282
12282
unfunded_context,
@@ -12342,7 +12342,7 @@ where
12342
12342
}),
12343
12343
channel_type: Some(self.funding.get_channel_type().clone()),
12344
12344
},
12345
- funding_satoshis: self.dual_funding_context .our_funding_satoshis,
12345
+ funding_satoshis: self.funding_negotiation_context .our_funding_satoshis,
12346
12346
second_per_commitment_point,
12347
12347
require_confirmed_inputs: None,
12348
12348
}
0 commit comments