Refactor FormatStateMessage into ValidationState

This commit is contained in:
Jeffrey Czyz
2019-11-08 13:22:36 -08:00
parent fe63d79eab
commit 0aed17ef28
15 changed files with 47 additions and 87 deletions

View File

@@ -51,7 +51,6 @@
#include <util/system.h>
#include <util/threadnames.h>
#include <util/translation.h>
#include <util/validation.h>
#include <util/asmap.h>
#include <validation.h>
#include <hash.h>
@@ -710,7 +709,7 @@ static void ThreadImport(std::vector<fs::path> vImportFiles)
// scan for better chains in the block chain database, that are not yet connected in the active best chain
BlockValidationState state;
if (!ActivateBestChain(state, chainparams)) {
LogPrintf("Failed to connect best block (%s)\n", FormatStateMessage(state));
LogPrintf("Failed to connect best block (%s)\n", state.ToString());
StartShutdown();
return;
}