Browse Source

Interrupt loading thread after shutdown request

Github-Pull: #12415
Rebased-From: 2e9406c0c588ddf6f039fd3ff73c978177483869
Tree-SHA512: ad70df9fdcba38bc9eeac4e4e64f7d8607fbe92aefac3579a26939e642112d70ebee81c5a227bb8735bae87f95640061a5ab22b583275c7dd6c3277544bc427b
0.16
João Barbosa 7 years ago committed by Wladimir J. van der Laan
parent
commit
f8938248ef
No known key found for this signature in database
GPG Key ID: 1E4AED62986CD25D
  1. 2
      src/init.cpp

2
src/init.cpp

@ -678,11 +678,13 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
if (!ActivateBestChain(state, chainparams)) { if (!ActivateBestChain(state, chainparams)) {
LogPrintf("Failed to connect best block"); LogPrintf("Failed to connect best block");
StartShutdown(); StartShutdown();
return;
} }
if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) { if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
LogPrintf("Stopping after block import\n"); LogPrintf("Stopping after block import\n");
StartShutdown(); StartShutdown();
return;
} }
} // End scope of CImportingNow } // End scope of CImportingNow
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) { if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {

Loading…
Cancel
Save