@@ -2777,7 +2777,7 @@ where
2777
2777
debug_assert!(self.interactive_tx_constructor.is_none());
2778
2778
2779
2779
let mut funding_inputs = Vec::new();
2780
- mem::swap(&mut self.dual_funding_context .our_funding_inputs, &mut funding_inputs);
2780
+ mem::swap(&mut self.funding_negotiation_context .our_funding_inputs, &mut funding_inputs);
2781
2781
2782
2782
// TODO(splicing): Add prev funding tx as input, must be provided as a parameter
2783
2783
@@ -2799,10 +2799,10 @@ where
2799
2799
.map_err(|_err| AbortReason::InternalError("Error getting destination script"))?
2800
2800
};
2801
2801
let change_value_opt = calculate_change_output_value(
2802
- self.funding.is_outbound(), self.dual_funding_context .our_funding_satoshis,
2802
+ self.funding.is_outbound(), self.funding_negotiation_context .our_funding_satoshis,
2803
2803
&funding_inputs, None,
2804
2804
&shared_funding_output.script_pubkey, &funding_outputs,
2805
- self.dual_funding_context .funding_feerate_sat_per_1000_weight,
2805
+ self.funding_negotiation_context .funding_feerate_sat_per_1000_weight,
2806
2806
change_script.minimal_non_dust().to_sat(),
2807
2807
)?;
2808
2808
if let Some(change_value) = change_value_opt {
@@ -2811,7 +2811,7 @@ where
2811
2811
script_pubkey: change_script,
2812
2812
};
2813
2813
let change_output_weight = get_output_weight(&change_output.script_pubkey).to_wu();
2814
- let change_output_fee = fee_for_weight(self.dual_funding_context .funding_feerate_sat_per_1000_weight, change_output_weight);
2814
+ let change_output_fee = fee_for_weight(self.funding_negotiation_context .funding_feerate_sat_per_1000_weight, change_output_weight);
2815
2815
let change_value_decreased_with_fee = change_value.saturating_sub(change_output_fee);
2816
2816
// Check dust limit again
2817
2817
if change_value_decreased_with_fee > self.context.holder_dust_limit_satoshis {
@@ -2825,12 +2825,12 @@ where
2825
2825
holder_node_id,
2826
2826
counterparty_node_id: self.context.counterparty_node_id,
2827
2827
channel_id: self.context.channel_id(),
2828
- feerate_sat_per_kw: self.dual_funding_context .funding_feerate_sat_per_1000_weight,
2828
+ feerate_sat_per_kw: self.funding_negotiation_context .funding_feerate_sat_per_1000_weight,
2829
2829
is_initiator: self.funding.is_outbound(),
2830
- funding_tx_locktime: self.dual_funding_context .funding_tx_locktime,
2830
+ funding_tx_locktime: self.funding_negotiation_context .funding_tx_locktime,
2831
2831
inputs_to_contribute: funding_inputs,
2832
2832
shared_funding_input: None,
2833
- shared_funding_output: SharedOwnedOutput::new(shared_funding_output, self.dual_funding_context .our_funding_satoshis),
2833
+ shared_funding_output: SharedOwnedOutput::new(shared_funding_output, self.funding_negotiation_context .our_funding_satoshis),
2834
2834
outputs_to_contribute: funding_outputs,
2835
2835
};
2836
2836
let mut tx_constructor = InteractiveTxConstructor::new(constructor_args)?;
@@ -2920,7 +2920,7 @@ where
2920
2920
where
2921
2921
L::Target: Logger
2922
2922
{
2923
- let our_funding_satoshis = self.dual_funding_context .our_funding_satoshis;
2923
+ let our_funding_satoshis = self.funding_negotiation_context .our_funding_satoshis;
2924
2924
let transaction_number = self.unfunded_context.transaction_number();
2925
2925
2926
2926
let mut output_index = None;
@@ -5841,8 +5841,8 @@ fn check_v2_funding_inputs_sufficient(
5841
5841
}
5842
5842
}
5843
5843
5844
- /// Context for dual-funded channels.
5845
- pub(super) struct DualFundingChannelContext {
5844
+ /// Context for negotiating channels ( dual-funded V2 open, splicing)
5845
+ pub(super) struct FundingNegotiationContext {
5846
5846
/// The amount in satoshis we will be contributing to the channel.
5847
5847
pub our_funding_satoshis: u64,
5848
5848
/// The amount in satoshis our counterparty will be contributing to the channel.
@@ -11796,7 +11796,7 @@ where
11796
11796
pub funding: FundingScope,
11797
11797
pub context: ChannelContext<SP>,
11798
11798
pub unfunded_context: UnfundedChannelContext,
11799
- pub dual_funding_context: DualFundingChannelContext ,
11799
+ pub funding_negotiation_context: FundingNegotiationContext ,
11800
11800
/// The current interactive transaction construction session under negotiation.
11801
11801
pub interactive_tx_constructor: Option<InteractiveTxConstructor>,
11802
11802
/// The signing session created after `tx_complete` handling
@@ -11859,7 +11859,7 @@ where
11859
11859
unfunded_channel_age_ticks: 0,
11860
11860
holder_commitment_point: HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
11861
11861
};
11862
- let dual_funding_context = DualFundingChannelContext {
11862
+ let funding_negotiation_context = FundingNegotiationContext {
11863
11863
our_funding_satoshis: funding_satoshis,
11864
11864
// TODO(dual_funding) TODO(splicing) Include counterparty contribution, once that's enabled
11865
11865
their_funding_satoshis: None,
@@ -11871,7 +11871,7 @@ where
11871
11871
funding,
11872
11872
context,
11873
11873
unfunded_context,
11874
- dual_funding_context ,
11874
+ funding_negotiation_context ,
11875
11875
interactive_tx_constructor: None,
11876
11876
interactive_tx_signing_session: None,
11877
11877
};
@@ -11947,7 +11947,7 @@ where
11947
11947
},
11948
11948
funding_feerate_sat_per_1000_weight: self.context.feerate_per_kw,
11949
11949
second_per_commitment_point,
11950
- locktime: self.dual_funding_context .funding_tx_locktime.to_consensus_u32(),
11950
+ locktime: self.funding_negotiation_context .funding_tx_locktime.to_consensus_u32(),
11951
11951
require_confirmed_inputs: None,
11952
11952
}
11953
11953
}
@@ -12019,7 +12019,7 @@ where
12019
12019
&funding.get_counterparty_pubkeys().revocation_basepoint);
12020
12020
context.channel_id = channel_id;
12021
12021
12022
- let dual_funding_context = DualFundingChannelContext {
12022
+ let funding_negotiation_context = FundingNegotiationContext {
12023
12023
our_funding_satoshis: our_funding_satoshis,
12024
12024
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
12025
12025
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
@@ -12037,8 +12037,8 @@ where
12037
12037
holder_node_id,
12038
12038
counterparty_node_id,
12039
12039
channel_id: context.channel_id,
12040
- feerate_sat_per_kw: dual_funding_context .funding_feerate_sat_per_1000_weight,
12041
- funding_tx_locktime: dual_funding_context .funding_tx_locktime,
12040
+ feerate_sat_per_kw: funding_negotiation_context .funding_feerate_sat_per_1000_weight,
12041
+ funding_tx_locktime: funding_negotiation_context .funding_tx_locktime,
12042
12042
is_initiator: false,
12043
12043
inputs_to_contribute: our_funding_inputs,
12044
12044
shared_funding_input: None,
@@ -12057,7 +12057,7 @@ where
12057
12057
Ok(Self {
12058
12058
funding,
12059
12059
context,
12060
- dual_funding_context ,
12060
+ funding_negotiation_context ,
12061
12061
interactive_tx_constructor,
12062
12062
interactive_tx_signing_session: None,
12063
12063
unfunded_context,
@@ -12123,7 +12123,7 @@ where
12123
12123
}),
12124
12124
channel_type: Some(self.funding.get_channel_type().clone()),
12125
12125
},
12126
- funding_satoshis: self.dual_funding_context .our_funding_satoshis,
12126
+ funding_satoshis: self.funding_negotiation_context .our_funding_satoshis,
12127
12127
second_per_commitment_point,
12128
12128
require_confirmed_inputs: None,
12129
12129
}
0 commit comments