mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +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:
@@ -329,7 +329,12 @@ class CVerifyDB {
|
||||
public:
|
||||
CVerifyDB();
|
||||
~CVerifyDB();
|
||||
bool VerifyDB(const CChainParams& chainparams, CChainState& active_chainstate, CCoinsView *coinsview, int nCheckLevel, int nCheckDepth) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
bool VerifyDB(
|
||||
CChainState& chainstate,
|
||||
const CChainParams& chainparams,
|
||||
CCoinsView& coinsview,
|
||||
int nCheckLevel,
|
||||
int nCheckDepth) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
};
|
||||
|
||||
enum DisconnectResult
|
||||
@@ -913,6 +918,8 @@ public:
|
||||
return m_blockman.m_block_index;
|
||||
}
|
||||
|
||||
//! @returns true if a snapshot-based chainstate is in use. Also implies
|
||||
//! that a background validation chainstate is also in use.
|
||||
bool IsSnapshotActive() const;
|
||||
|
||||
std::optional<uint256> SnapshotBlockhash() const;
|
||||
|
||||
Reference in New Issue
Block a user