@@ -41,8 +41,8 @@ use crate::ln::chan_utils;
41
41
#[cfg(splicing)]
42
42
use crate::ln::chan_utils::FUNDING_TRANSACTION_WITNESS_WEIGHT;
43
43
use crate::ln::chan_utils::{
44
- commitment_sat_per_1000_weight_for_type, get_commitment_transaction_number_obscure_factor ,
45
- max_htlcs, second_stage_tx_fees_sat , ChannelPublicKeys, ChannelTransactionParameters,
44
+ get_commitment_transaction_number_obscure_factor, max_htlcs, second_stage_tx_fees_sat ,
45
+ selected_commitment_sat_per_1000_weight , ChannelPublicKeys, ChannelTransactionParameters,
46
46
ClosingTransaction, CommitmentTransaction, CounterpartyChannelTransactionParameters,
47
47
CounterpartyCommitmentSecrets, HTLCOutputInCommitment, HolderCommitmentTransaction,
48
48
};
@@ -3392,7 +3392,9 @@ where
3392
3392
debug_assert!(!channel_type.supports_any_optional_bits());
3393
3393
debug_assert!(!channel_type.requires_unknown_bits_from(&channelmanager::provided_channel_type_features(&config)));
3394
3394
3395
- let commitment_feerate = commitment_sat_per_1000_weight_for_type(&fee_estimator, &channel_type);
3395
+ let commitment_feerate = selected_commitment_sat_per_1000_weight(
3396
+ &fee_estimator, &channel_type,
3397
+ );
3396
3398
3397
3399
let value_to_self_msat = channel_value_satoshis * 1000 - push_msat;
3398
3400
let commit_tx_fee_sat = SpecTxBuilder {}.commit_tx_fee_sat(commitment_feerate, MIN_AFFORDABLE_HTLC_COUNT, &channel_type);
@@ -5460,7 +5462,9 @@ where
5460
5462
5461
5463
let next_channel_type = get_initial_channel_type(user_config, &eligible_features);
5462
5464
5463
- self.feerate_per_kw = commitment_sat_per_1000_weight_for_type(&fee_estimator, &next_channel_type);
5465
+ self.feerate_per_kw = selected_commitment_sat_per_1000_weight(
5466
+ &fee_estimator, &next_channel_type,
5467
+ );
5464
5468
funding.channel_transaction_parameters.channel_type_features = next_channel_type;
5465
5469
5466
5470
Ok(())
0 commit comments