Skip to content

Commit fbb49f9

Browse files
UdjinM6codablock
authored andcommitted
Bail out properly on Evo DB consistency check failures in ConnectBlock/DisconnectBlock (#3044)
1 parent 8d89350 commit fbb49f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,7 @@ static DisconnectResult DisconnectBlock(const CBlock& block, CValidationState& s
13931393
if (fDIP0003Active && !fHasBestBlock) {
13941394
// Nodes that upgraded after DIP3 activation will have to reindex to ensure evodb consistency
13951395
AbortNode("Found EvoDB inconsistency, you must reindex to continue");
1396+
return DISCONNECT_FAILED;
13961397
}
13971398

13981399
bool fClean = true;
@@ -1688,7 +1689,7 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
16881689

16891690
if (fDIP0003Active && !fHasBestBlock) {
16901691
// Nodes that upgraded after DIP3 activation will have to reindex to ensure evodb consistency
1691-
AbortNode("Found EvoDB inconsistency, you must reindex to continue");
1692+
return AbortNode(state, "Found EvoDB inconsistency, you must reindex to continue");
16921693
}
16931694
}
16941695

0 commit comments

Comments
 (0)