Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge dashpay#6219: fix: correct is_snapshot_cs in VerifyDB
bf377d4 fix: correct is_snapshot_cs in VerifyDB (James O'Beirne) Pull request description: ## Issue being fixed or feature implemented Flag `is_snapshot_cs` has been inverted in bitcoin#21584 Discovered during investigation of issue: ``` Verifying last 6 blocks at level 3 2024-08-14T14:51:55Z [0%]...*** Found EvoDB inconsistency, you must reindex to continue ``` So far as code below does: ``` if ((fPruneMode || is_snapshot_cs) && !(pindex->nStatus & BLOCK_HAVE_DATA)) { // If pruning or running under an assumeutxo snapshot, only go // back as far as we have data. LogPrintf("VerifyDB(): block verification stopping at height %d (pruning, no data)\n", pindex->nHeight); break; } ``` In case of missing data in evo db we will get instead of "block verification stopping at height" we may get data inconsistency issue. ## What was done? Inverted condition back (same fix in bitcoin#27596) ## How Has This Been Tested? Unit/functional tests doesn't cover it, but they do no fail after fix. ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK bf377d4 PastaPastaPasta: utACK bf377d4 Tree-SHA512: ac21e6db6e23c4c7dc150fb16171aef47c9f42c29466b403bca7d56ed6faa2fccc41df92e1fabec4d6e9fd56991e152dea168593a4550fc3583631a63009c27f
- Loading branch information