From fbb49f92d0b2eaf94fb30dfe71965dc38ac15272 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 7 Aug 2019 12:55:07 +0300 Subject: [PATCH] Bail out properly on Evo DB consistency check failures in ConnectBlock/DisconnectBlock (#3044) --- src/validation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 53bddc8589..0730e78443 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1393,6 +1393,7 @@ static DisconnectResult DisconnectBlock(const CBlock& block, CValidationState& s if (fDIP0003Active && !fHasBestBlock) { // Nodes that upgraded after DIP3 activation will have to reindex to ensure evodb consistency AbortNode("Found EvoDB inconsistency, you must reindex to continue"); + return DISCONNECT_FAILED; } bool fClean = true; @@ -1688,7 +1689,7 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd if (fDIP0003Active && !fHasBestBlock) { // Nodes that upgraded after DIP3 activation will have to reindex to ensure evodb consistency - AbortNode("Found EvoDB inconsistency, you must reindex to continue"); + return AbortNode(state, "Found EvoDB inconsistency, you must reindex to continue"); } }