@@ -41,8 +41,8 @@ use crate::ln::chan_utils;
4141#[cfg(splicing)]
4242use crate::ln::chan_utils::FUNDING_TRANSACTION_WITNESS_WEIGHT;
4343use 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,
4646 ClosingTransaction, CommitmentTransaction, CounterpartyChannelTransactionParameters,
4747 CounterpartyCommitmentSecrets, HTLCOutputInCommitment, HolderCommitmentTransaction,
4848};
@@ -3392,7 +3392,9 @@ where
33923392 debug_assert!(!channel_type.supports_any_optional_bits());
33933393 debug_assert!(!channel_type.requires_unknown_bits_from(&channelmanager::provided_channel_type_features(&config)));
33943394
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+ );
33963398
33973399 let value_to_self_msat = channel_value_satoshis * 1000 - push_msat;
33983400 let commit_tx_fee_sat = SpecTxBuilder {}.commit_tx_fee_sat(commitment_feerate, MIN_AFFORDABLE_HTLC_COUNT, &channel_type);
@@ -5460,7 +5462,9 @@ where
54605462
54615463 let next_channel_type = get_initial_channel_type(user_config, &eligible_features);
54625464
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+ );
54645468 funding.channel_transaction_parameters.channel_type_features = next_channel_type;
54655469
54665470 Ok(())
0 commit comments