Merge pull request #5923 from nuttycom/logging/error_log_anchor_mismatch

Use ERROR level logging for fatal errors in main/init
This commit is contained in:
Kris Nuttycombe 2022-05-03 19:25:05 -06:00 committed by GitHub
commit c5493c168b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -642,7 +642,7 @@ void ThreadStartWalletNotifier()
"Giving up; please restart with `-rescan`.",
walletBestBlockHash.value().GetHex());
LogPrintf("*** %s: %s", __func__, errmsg);
LogError("main", "*** %s: %s", __func__, errmsg);
uiInterface.ThreadSafeMessageBox(
_("Error: A fatal wallet synchronization error occurred, see debug.log for details"),
"", CClientUIInterface::MSG_ERROR);

View File

@ -150,7 +150,7 @@ namespace {
bool AbortNode(const std::string& strMessage, const std::string& userMessage="")
{
SetMiscWarning(strMessage, GetTime());
LogPrintf("*** %s\n", strMessage);
LogError("main", "*** %s\n", strMessage);
uiInterface.ThreadSafeMessageBox(
userMessage.empty() ? _("Error: A fatal internal error occurred, see debug.log for details") : userMessage,
"", CClientUIInterface::MSG_ERROR);
@ -4131,7 +4131,7 @@ static bool ActivateBestChainStep(CValidationState& state, const CChainParams& c
"- " + strprintf(_("Fork point: %s, height %d"),
pindexFork->phashBlock->GetHex(), pindexFork->nHeight) + "\n\n" +
_("Please help, human!");
LogPrintf("*** %s\n", msg);
LogError("main", "*** %s\n", msg);
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_ERROR);
StartShutdown();
return false;
@ -5638,7 +5638,7 @@ bool RewindBlockIndex(const CChainParams& chainparams, bool& clearWitnessCaches)
"- " + strprintf(_("Rewinding to: %s, height %d"),
pindexRewind->phashBlock->GetHex(), pindexRewind->nHeight) + "\n\n" +
_("Please help, human!");
LogPrintf("*** %s\n", msg);
LogError("main", "*** %s\n", msg);
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_ERROR);
StartShutdown();
return false;