aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-04-27 13:30:04 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-04-27 13:31:29 +0200
commitc6d6bc8abb721be68a3d2cdba11ceb5e9814c9b1 (patch)
tree06fd5a252041c4e8044c4098cffa51334cda4b36 /src/init.cpp
parentac219dcbcc18a48210d58cdfaf7cf27ca5e7435b (diff)
parent844ad0eccaa1dbfefc30d19804d95d67c3d5f06d (diff)
downloadbitcoin-c6d6bc8abb721be68a3d2cdba11ceb5e9814c9b1.tar.xz
Merge bitcoin/bitcoin#21523: validation: run VerifyDB on all chainstates
844ad0eccaa1dbfefc30d19804d95d67c3d5f06d doc: IsSnapshotActive (James O'Beirne) 9b604c0207b526c008617cdca210f35db5e344db validation: prepare VerifyDB for assumeutxo (James O'Beirne) 7901647d722bcc5b0554ad73b14481cbe73608e4 refactor: rename active_chainstate in VerifyDB (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: #15606) --- ~~Pretty cut and dry; parameterizes `CVerifyDB` methods so that we can run the verify procedure on multiple chainstates.~~ Two minor tweaks to ensure that `VerifyDB` can be run on multiple chainstates and a corresponding rename. ACKs for top commit: fjahr: Code review re-ACK 844ad0eccaa1dbfefc30d19804d95d67c3d5f06d MarcoFalke: review ACK 844ad0eccaa1dbfefc30d19804d95d67c3d5f06d 🐥 Tree-SHA512: 26a398cf4dabc1aa0850743921dba0452b4813848a3c777586dc981716737e98e17b8110254a5c41af95dd236e0c00dc8b4eee891d69bef825a5e1911fc499d0
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 24d67f48dc..3f9838f2e0 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1525,11 +1525,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");