diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-05-29 18:56:58 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-06-08 16:38:36 -0300 |
commit | 9ddf7e03a35592617a016418fd320cc93c8d1abd (patch) | |
tree | 1ce52cd3576408fd7e4123eb044a32a799ec4ec6 | |
parent | a36134fcc7b40671d538931f621c8c15ffacc3d2 (diff) | |
download | bitcoin-9ddf7e03a35592617a016418fd320cc93c8d1abd.tar.xz |
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'.
-rw-r--r-- | src/node/blockstorage.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index b7afa8a7c3..1368ae6f6d 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -928,8 +928,7 @@ void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImportFile for (Chainstate* chainstate : WITH_LOCK(::cs_main, return chainman.GetAll())) { BlockValidationState state; if (!chainstate->ActivateBestChain(state, nullptr)) { - LogPrintf("Failed to connect best block (%s)\n", state.ToString()); - StartShutdown(); + AbortNode(strprintf("Failed to connect best block (%s)", state.ToString())); return; } } |