diff options
author | mruddy <6440430+mruddy@users.noreply.github.com> | 2018-06-30 07:25:25 -0400 |
---|---|---|
committer | mruddy <6440430+mruddy@users.noreply.github.com> | 2018-06-30 07:25:25 -0400 |
commit | 2dcd7b4ec76dc23bf901f4517703758c3fa377ba (patch) | |
tree | 686e0b7940e2fb4f58127b3e99a8c7d3843fe815 /src/init.cpp | |
parent | a6ed99a1e6facd38913711106bce6fb65bd14862 (diff) |
logging: avoid nStart may be used uninitialized in AppInitMain warning
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp index 5e45277986..f5bb4f4ac1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1305,8 +1305,6 @@ bool AppInitMain() return InitError(_("Unable to start HTTP server. See debug log for details.")); } - int64_t nStart; - // ********************************************************* Step 5: verify wallet database integrity if (!g_wallet_init_interface.Verify()) return false; @@ -1458,8 +1456,8 @@ bool AppInitMain() LOCK(cs_main); - nStart = GetTimeMillis(); do { + const int64_t load_block_index_start_time = GetTimeMillis(); try { UnloadBlockIndex(); pcoinsTip.reset(); @@ -1582,6 +1580,7 @@ bool AppInitMain() } fLoaded = true; + LogPrintf(" block index %15dms\n", GetTimeMillis() - load_block_index_start_time); } while(false); if (!fLoaded && !fRequestShutdown) { @@ -1612,9 +1611,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); |