What changed, and why it matters
This commit is a minor logging cleanup. It changes one routine status message from a default 'info' log to a less-visible 'debug' log, and makes the log message show the full file path instead of just the filename. There is no security issue here.
No security action needed. Treat as normal maintenance/logging cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies CBlockPolicyEstimator::FlushFeeEstimates() to use LogDebug(BCLog::ESTIMATEFEE, …) instead of LogInfo(…), and to log m_estimation_filepath (full path) rather than m_estimation_filepath.filename(). The functional test is updated to match the new full-path message. This is purely a log-level/path-formatting change with no functional or security impact.
Changed components
src/policy/fees/block_policy_estimator.cpptest/functional/feature_fee_estimation.pyInspect captured patch +5 / −4
diff --git a/src/policy/fees/block_policy_estimator.cpp b/src/policy/fees/block_policy_estimator.cpp
index 2fdefc9a..423daba1 100644
--- a/src/policy/fees/block_policy_estimator.cpp
+++ b/src/policy/fees/block_policy_estimator.cpp
@@ -972,7 +972,7 @@ void CBlockPolicyEstimator::FlushFeeEstimates()
LogWarning("Failed to close fee estimates file %s: %s. Continuing anyway.", fs::PathToString(m_estimation_filepath), SysErrorString(errno));
return;
}
- LogInfo("Flushed fee estimates to %s.", fs::PathToString(m_estimation_filepath.filename()));
+ LogDebug(BCLog::ESTIMATEFEE, "Flushed fee estimates to %s.", fs::PathToString(m_estimation_filepath));
}
bool CBlockPolicyEstimator::Write(AutoFile& fileout) const
diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py
index ca45945e..a6b721e1 100755
--- a/test/functional/feature_fee_estimation.py
+++ b/test/functional/feature_fee_estimation.py
@@ -332,7 +332,8 @@ class EstimateFeeTest(BitcoinTestFramework):
# Verify if the string "Flushed fee estimates to fee_estimates.dat." is present in the debug log file.
# If present, it indicates that fee estimates have been successfully flushed to disk.
- with self.nodes[0].assert_debug_log(expected_msgs=["Flushed fee estimates to fee_estimates.dat."], timeout=1):
+ expected_messages = [f"Flushed fee estimates to {fee_dat}."]
+ with self.nodes[0].assert_debug_log(expected_msgs=expected_messages, timeout=1):
# Mock the scheduler for an hour to flush fee estimates to fee_estimates.dat
self.nodes[0].mockscheduler(SECONDS_PER_HOUR)
@@ -342,7 +343,7 @@ class EstimateFeeTest(BitcoinTestFramework):
# Verify that the estimates remain the same if there are no blocks in the flush interval
block_hash_before = self.nodes[0].getbestblockhash()
fee_dat_initial_content = open(fee_dat, "rb").read()
- with self.nodes[0].assert_debug_log(expected_msgs=["Flushed fee estimates to fee_estimates.dat."], timeout=1):
+ with self.nodes[0].assert_debug_log(expected_msgs=expected_messages, timeout=1):
# Mock the scheduler for an hour to flush fee estimates to fee_estimates.dat
self.nodes[0].mockscheduler(SECONDS_PER_HOUR)
@@ -358,7 +359,7 @@ class EstimateFeeTest(BitcoinTestFramework):
assert_equal(fee_dat_current_content, fee_dat_initial_content)
# Verify that the estimates are not the same if new blocks were produced in the flush interval
- with self.nodes[0].assert_debug_log(expected_msgs=["Flushed fee estimates to fee_estimates.dat."], timeout=1):
+ with self.nodes[0].assert_debug_log(expected_msgs=expected_messages, timeout=1):
# Mock the scheduler for an hour to flush fee estimates to fee_estimates.dat
self.generate(self.nodes[0], 5, sync_fun=self.no_op)
self.nodes[0].mockscheduler(SECONDS_PER_HOUR)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.