Skip to content

Commit

Permalink
Merge #12415: Interrupt loading thread after shutdown request
Browse files Browse the repository at this point in the history
2e9406c Interrupt loading thread after shutdown request (João Barbosa)

Pull request description:

  This change (currently) avoids loading the mempool if shutdown is requested.

Tree-SHA512: 3dca3a6ea5b09bd71db0974584d93dfe81819bc0bdbb4d9b6fa0474755306d1403f6c058ecb8211384493a8f7ca3a9134173db744b7344043cfc7d79286c8fd4
  • Loading branch information
laanwj committed Feb 15, 2018
2 parents ae0fbf0 + 2e9406c commit 737ed8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/init.cpp
Expand Up @@ -680,11 +680,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)) {
Expand Down

0 comments on commit 737ed8b

Please sign in to comment.