From: Wilmer Paulino Date: Mon, 17 Jul 2023 17:56:16 +0000 (-0700) Subject: Clarify log for commitment transaction already meeting required feerate X-Git-Tag: v0.0.116~6^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=52ec0824011f4a2e6ee3f9edc447d9ac0aacc354;p=rust-lightning Clarify log for commitment transaction already meeting required feerate --- 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()))); } }