Merge c6d6bc8abb into merged_master (Bitcoin PR bitcoin/bitcoin#21523)

This commit is contained in:
Andrew Poelstra 2021-07-01 13:43:23 +00:00
commit 6f238f5ad9
4 changed files with 41 additions and 26 deletions

View file

@ -1585,11 +1585,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(
chainparams, *chainstate, &chainstate->CoinsDB(),
if (!CVerifyDB().VerifyDB(
*chainstate, chainparams, chainstate->CoinsDB(),
args.GetArg("-checklevel", DEFAULT_CHECKLEVEL),
args.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS))) {
strLoadError = _("Corrupted block database detected");