mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge bitcoin/bitcoin#21523: validation: run VerifyDB on all chainstates
844ad0eccadoc: IsSnapshotActive (James O'Beirne)9b604c0207validation: prepare VerifyDB for assumeutxo (James O'Beirne)7901647d72refactor: 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-ACK844ad0eccaMarcoFalke: review ACK844ad0ecca🐥 Tree-SHA512: 26a398cf4dabc1aa0850743921dba0452b4813848a3c777586dc981716737e98e17b8110254a5c41af95dd236e0c00dc8b4eee891d69bef825a5e1911fc499d0
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user