aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2021-04-13 10:05:28 -0400
committerJames O'Beirne <james.obeirne@pm.me>2021-04-23 15:06:48 -0400
commit9b604c0207b526c008617cdca210f35db5e344db (patch)
treec144b73559ae20405ce9cbccb95fef580284d1e8 /src/init.cpp
parent7901647d722bcc5b0554ad73b14481cbe73608e4 (diff)
downloadbitcoin-9b604c0207b526c008617cdca210f35db5e344db.tar.xz
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.cpp7
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");