diff options
author | James O'Beirne <james.obeirne@pm.me> | 2021-04-13 10:05:28 -0400 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2021-04-23 15:06:48 -0400 |
commit | 9b604c0207b526c008617cdca210f35db5e344db (patch) | |
tree | c144b73559ae20405ce9cbccb95fef580284d1e8 /src/init.cpp | |
parent | 7901647d722bcc5b0554ad73b14481cbe73608e4 (diff) |
validation: prepare VerifyDB for assumeutxo
Removes assumptions of use only on the active chainstate.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp index ccf3680817..2b1cd3e2aa 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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"); |