diff --git a/src/init.cpp b/src/init.cpp index 07acb49d39..0482d2bab8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1840,8 +1840,8 @@ bool AppInitMain() uiInterface.InitMessage(_("Loading block index...")); - nStart = GetTimeMillis(); do { + const int64_t load_block_index_start_time = GetTimeMillis(); try { UnloadBlockIndex(); pcoinsTip.reset(); @@ -2007,6 +2007,7 @@ bool AppInitMain() } fLoaded = true; + LogPrintf(" block index %15dms\n", GetTimeMillis() - load_block_index_start_time); } while(false); if (!fLoaded && !fRequestShutdown) { @@ -2037,9 +2038,6 @@ bool AppInitMain() LogPrintf("Shutdown requested. Exiting.\n"); return false; } - if (fLoaded) { - LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart); - } fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION);