From b839badfdd7f01b5f848a4cff6ed89cd29c49525 Mon Sep 17 00:00:00 2001 From: elnafateh Date: Mon, 16 Nov 2026 16:44:09 +0100 Subject: [PATCH] Fix splice feerate overflow (AI-assisted) --- src/fee_estimator.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fee_estimator.rs b/src/fee_estimator.rs index 072fea15bd..78a3d37ab3 100644 --- a/src/fee_estimator.rs +++ b/src/fee_estimator.rs @@ -180,7 +180,8 @@ pub(crate) fn apply_post_estimation_adjustments( /// The most we are willing to pay for a channel funding transaction: `1.5x` our funding feerate /// estimate. Used as the `max_feerate` ceiling for splices and their RBF fee bumps. pub(crate) fn max_funding_feerate(estimate: FeeRate) -> FeeRate { - FeeRate::from_sat_per_kwu(estimate.to_sat_per_kwu() * 3 / 2) + let sats_per_kwu = estimate.to_sat_per_kwu(); + FeeRate::from_sat_per_kwu(sats_per_kwu.saturating_add(sats_per_kwu / 2)) } /// Picks the `(target, max)` feerates for replacing a pending splice's in-flight funding