mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-22 14:52:41 +02:00
tx fees, policy: doc: update and delete unnecessary comment
This commit is contained in:
parent
60d3e4b0cd
commit
22d5d4b2b2
@ -548,14 +548,12 @@ CBlockPolicyEstimator::CBlockPolicyEstimator(const fs::path& estimation_filepath
|
|||||||
|
|
||||||
AutoFile est_file{fsbridge::fopen(m_estimation_filepath, "rb")};
|
AutoFile est_file{fsbridge::fopen(m_estimation_filepath, "rb")};
|
||||||
|
|
||||||
// Whenever the fee estimation file is not present return early
|
|
||||||
if (est_file.IsNull()) {
|
if (est_file.IsNull()) {
|
||||||
LogPrintf("%s is not found. Continue anyway.\n", fs::PathToString(m_estimation_filepath));
|
LogPrintf("%s is not found. Continue anyway.\n", fs::PathToString(m_estimation_filepath));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::hours file_age = GetFeeEstimatorFileAge();
|
std::chrono::hours file_age = GetFeeEstimatorFileAge();
|
||||||
// fee estimate file must not be too old to avoid wrong fee estimates.
|
|
||||||
if (file_age > MAX_FILE_AGE && !read_stale_estimates) {
|
if (file_age > MAX_FILE_AGE && !read_stale_estimates) {
|
||||||
LogPrintf("Fee estimation file %s too old (age=%lld > %lld hours) and will not be used to avoid serving stale estimates.\n", fs::PathToString(m_estimation_filepath), Ticks<std::chrono::hours>(file_age), Ticks<std::chrono::hours>(MAX_FILE_AGE));
|
LogPrintf("Fee estimation file %s too old (age=%lld > %lld hours) and will not be used to avoid serving stale estimates.\n", fs::PathToString(m_estimation_filepath), Ticks<std::chrono::hours>(file_age), Ticks<std::chrono::hours>(MAX_FILE_AGE));
|
||||||
return;
|
return;
|
||||||
|
@ -25,8 +25,9 @@
|
|||||||
// How often to flush fee estimates to fee_estimates.dat.
|
// How often to flush fee estimates to fee_estimates.dat.
|
||||||
static constexpr std::chrono::hours FEE_FLUSH_INTERVAL{1};
|
static constexpr std::chrono::hours FEE_FLUSH_INTERVAL{1};
|
||||||
|
|
||||||
/** fee_estimates.dat that are more than 60 hours (2.5 days) will not be read,
|
/** fee_estimates.dat that are more than 60 hours (2.5 days) old will not be read,
|
||||||
* as the estimates in the file are stale.
|
* as fee estimates are based on historical data and may be inaccurate if
|
||||||
|
* network activity has changed.
|
||||||
*/
|
*/
|
||||||
static constexpr std::chrono::hours MAX_FILE_AGE{60};
|
static constexpr std::chrono::hours MAX_FILE_AGE{60};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user