validation: prepare VerifyDB for assumeutxo

Removes assumptions of use only on the active chainstate.
This commit is contained in:
James O'Beirne
2021-04-13 10:05:28 -04:00
parent 7901647d72
commit 9b604c0207
4 changed files with 15 additions and 13 deletions

View File

@@ -1550,11 +1550,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
break;
}
// Only verify the DB of the active chainstate. This is fixed in later
// work when we allow VerifyDB to be parameterized by chainstate.
if (&::ChainstateActive() == chainstate &&
!CVerifyDB().VerifyDB(
*chainstate, chainparams, &chainstate->CoinsDB(),
if (!CVerifyDB().VerifyDB(
*chainstate, chainparams, chainstate->CoinsDB(),
args.GetArg("-checklevel", DEFAULT_CHECKLEVEL),
args.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS))) {
strLoadError = _("Corrupted block database detected");