Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 1,342 Lines • ▼ Show 20 Lines | static bool UndoReadFromDisk(CBlockUndo &blockundo, const CBlockIndex *pindex) { | ||||
if (hashChecksum != verifier.GetHash()) { | if (hashChecksum != verifier.GetHash()) { | ||||
return error("%s: Checksum mismatch", __func__); | return error("%s: Checksum mismatch", __func__); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
/** Abort with a message */ | /** Abort with a message */ | ||||
bool AbortNode(const std::string &strMessage, | static bool AbortNode(const std::string &strMessage, | ||||
const std::string &userMessage = "") { | const std::string &userMessage = "") { | ||||
SetMiscWarning(strMessage); | SetMiscWarning(strMessage); | ||||
LogPrintf("*** %s\n", strMessage); | LogPrintf("*** %s\n", strMessage); | ||||
uiInterface.ThreadSafeMessageBox( | uiInterface.ThreadSafeMessageBox( | ||||
userMessage.empty() ? _("Error: A fatal internal error occurred, see " | userMessage.empty() ? _("Error: A fatal internal error occurred, see " | ||||
"debug.log for details") | "debug.log for details") | ||||
: userMessage, | : userMessage, | ||||
"", CClientUIInterface::MSG_ERROR); | "", CClientUIInterface::MSG_ERROR); | ||||
StartShutdown(); | StartShutdown(); | ||||
return false; | return false; | ||||
} | } | ||||
bool AbortNode(CValidationState &state, const std::string &strMessage, | static bool AbortNode(CValidationState &state, const std::string &strMessage, | ||||
const std::string &userMessage = "") { | const std::string &userMessage = "") { | ||||
AbortNode(strMessage, userMessage); | AbortNode(strMessage, userMessage); | ||||
return state.Error(strMessage); | return state.Error(strMessage); | ||||
} | } | ||||
} // namespace | } // namespace | ||||
/** Restore the UTXO in a Coin at a given COutPoint. */ | /** Restore the UTXO in a Coin at a given COutPoint. */ | ||||
DisconnectResult UndoCoinSpend(const Coin &undo, CCoinsViewCache &view, | DisconnectResult UndoCoinSpend(const Coin &undo, CCoinsViewCache &view, | ||||
▲ Show 20 Lines • Show All 4,287 Lines • Show Last 20 Lines |