]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Clarify log for commitment transaction already meeting required feerate
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Mon, 17 Jul 2023 17:56:16 +0000 (10:56 -0700)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Mon, 17 Jul 2023 17:57:37 +0000 (10:57 -0700)
lightning/src/chain/onchaintx.rs

index 171caf7006e873615e11fd1f8ea0b999d5f24411..f7071bf0ce6b2c62474bb6b01a0e31797794caec 100644 (file)
@@ -633,11 +633,12 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
                                                .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::<u64>();
-                                               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())));
                                                }
                                        }