Skip to content

Commit 9ddf7e0

Browse files
committed
move ThreadImport ABC error to use AbortNode
'StartShutdown' should only be used for user requested shutdowns. Internal errors that cause a shutdown should use 'AbortNode'.
1 parent a36134f commit 9ddf7e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/node/blockstorage.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,8 +928,7 @@ void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImportFile
928928
for (Chainstate* chainstate : WITH_LOCK(::cs_main, return chainman.GetAll())) {
929929
BlockValidationState state;
930930
if (!chainstate->ActivateBestChain(state, nullptr)) {
931-
LogPrintf("Failed to connect best block (%s)\n", state.ToString());
932-
StartShutdown();
931+
AbortNode(strprintf("Failed to connect best block (%s)", state.ToString()));
933932
return;
934933
}
935934
}

0 commit comments

Comments
 (0)