mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
node/chainstate: Decouple from GetTimeMillis
...instead just move it out
This commit is contained in:
@@ -1419,6 +1419,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
|
||||
uiInterface.InitMessage(_("Loading block index…").translated);
|
||||
|
||||
const int64_t load_block_index_start_time = GetTimeMillis();
|
||||
bool rv = LoadChainstate(fLoaded,
|
||||
strLoadError,
|
||||
fReset,
|
||||
@@ -1432,6 +1433,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
nCoinDBCache,
|
||||
nCoinCacheUsage);
|
||||
if (!rv) return false;
|
||||
if (fLoaded) {
|
||||
LogPrintf(" block index %15dms\n", GetTimeMillis() - load_block_index_start_time);
|
||||
}
|
||||
|
||||
if (!fLoaded && !ShutdownRequested()) {
|
||||
// first suggest a reindex
|
||||
|
||||
Reference in New Issue
Block a user