File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
75
75
static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1 };
76
76
/* * Time to wait between flushing chainstate to disk. */
77
77
static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{24 };
78
- /* * Maximum age of our tip in seconds for us to be considered current for fee estimation */
79
- static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60 ;
78
+ /* * Maximum age of our tip for us to be considered current for fee estimation */
79
+ static constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE{ 3 } ;
80
80
81
81
bool CBlockIndexWorkComparator::operator ()(const CBlockIndex *pa, const CBlockIndex *pb) const {
82
82
// First sort by most total work, ...
@@ -347,7 +347,7 @@ static bool IsCurrentForFeeEstimation() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
347
347
AssertLockHeld (cs_main);
348
348
if (::ChainstateActive ().IsInitialBlockDownload ())
349
349
return false ;
350
- if (::ChainActive ().Tip ()->GetBlockTime () < (GetTime () - MAX_FEE_ESTIMATION_TIP_AGE))
350
+ if (::ChainActive ().Tip ()->GetBlockTime () < count_seconds (GetTime<std::chrono::seconds> () - MAX_FEE_ESTIMATION_TIP_AGE))
351
351
return false ;
352
352
if (::ChainActive ().Height () < pindexBestHeader->nHeight - 1 )
353
353
return false ;
You can’t perform that action at this time.
0 commit comments