Skip to content

Commit 737ed8b

Browse files
committed
Merge #12415: Interrupt loading thread after shutdown request
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
2 parents ae0fbf0 + 2e9406c commit 737ed8b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/init.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,13 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
680680
if (!ActivateBestChain(state, chainparams)) {
681681
LogPrintf("Failed to connect best block");
682682
StartShutdown();
683+
return;
683684
}
684685

685686
if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
686687
LogPrintf("Stopping after block import\n");
687688
StartShutdown();
689+
return;
688690
}
689691
} // End scope of CImportingNow
690692
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {

0 commit comments

Comments
 (0)