From 52ec0824011f4a2e6ee3f9edc447d9ac0aacc354 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Mon, 17 Jul 2023 10:56:16 -0700 Subject: [PATCH] Clarify log for commitment transaction already meeting required feerate --- lightning/src/chain/onchaintx.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lightning/src/chain/onchaintx.rs b/lightning/src/chain/onchaintx.rs index 171caf700..f7071bf0c 100644 --- a/lightning/src/chain/onchaintx.rs +++ b/lightning/src/chain/onchaintx.rs @@ -633,11 +633,12 @@ impl OnchainTxHandler .compute_package_feerate(fee_estimator, conf_target, force_feerate_bump); if let Some(input_amount_sat) = output.funding_amount { let fee_sat = input_amount_sat - tx.output.iter().map(|output| output.value).sum::(); - if compute_feerate_sat_per_1000_weight(fee_sat, tx.weight() as u64) >= - package_target_feerate_sat_per_1000_weight - { - log_debug!(logger, "Commitment transaction {} already meets required feerate {} sat/kW", - tx.txid(), package_target_feerate_sat_per_1000_weight); + let commitment_tx_feerate_sat_per_1000_weight = + compute_feerate_sat_per_1000_weight(fee_sat, tx.weight() as u64); + if commitment_tx_feerate_sat_per_1000_weight >= package_target_feerate_sat_per_1000_weight { + log_debug!(logger, "Pre-signed {} already has feerate {} sat/kW above required {} sat/kW", + log_tx!(tx), commitment_tx_feerate_sat_per_1000_weight, + package_target_feerate_sat_per_1000_weight); return Some((new_timer, 0, OnchainClaim::Tx(tx.clone()))); } } -- 2.39.5