Browse Source

Interrupt loading thread after shutdown request

Github-Pull: #12415
Rebased-From: 2e9406c0c5
Tree-SHA512: ad70df9fdcba38bc9eeac4e4e64f7d8607fbe92aefac3579a26939e642112d70ebee81c5a227bb8735bae87f95640061a5ab22b583275c7dd6c3277544bc427b
tags/v0.16.1
João Barbosa 2 years ago
parent
commit
f8938248ef
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/init.cpp

+ 2
- 0
src/init.cpp View File

@@ -678,11 +678,13 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
if (!ActivateBestChain(state, chainparams)) {
LogPrintf("Failed to connect best block");
StartShutdown();
return;
}

if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
LogPrintf("Stopping after block import\n");
StartShutdown();
return;
}
} // End scope of CImportingNow
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {

Loading…
Cancel
Save