aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
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/validation.h
parentac219dcbcc18a48210d58cdfaf7cf27ca5e7435b (diff)
parent844ad0eccaa1dbfefc30d19804d95d67c3d5f06d (diff)
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/validation.h')
-rw-r--r--src/validation.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h
index 9ae2838ead..a5e6892aa9 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -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;