diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-04-15 06:53:19 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-05-10 12:09:33 +1000 |
commit | bb5c24b120a3ac7df367a1c5d9b075ca564efb5f (patch) | |
tree | fb615ac890a78c4536a985db148c0d70d4ad2ef7 /src/validation.h | |
parent | eca22c726ac48b4216bb68cc0f0bbd655c43ac12 (diff) | |
download | bitcoin-bb5c24b120a3ac7df367a1c5d9b075ca564efb5f.tar.xz |
validation: move g_versionbitscache into ChainstateManager
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/validation.h b/src/validation.h index 9d6b1d5932..04745a6e36 100644 --- a/src/validation.h +++ b/src/validation.h @@ -28,6 +28,7 @@ #include <util/check.h> #include <util/hasher.h> #include <util/translation.h> +#include <versionbits.h> #include <atomic> #include <map> @@ -937,6 +938,11 @@ public: return m_blockman.m_block_index; } + /** + * Track versionbit status + */ + mutable VersionBitsCache m_versionbitscache; + //! @returns true if a snapshot-based chainstate is in use. Also implies //! that a background validation chainstate is also in use. bool IsSnapshotActive() const; @@ -1008,13 +1014,13 @@ public: template<typename DEP> bool DeploymentActiveAfter(const CBlockIndex* pindexPrev, const ChainstateManager& chainman, DEP dep) { - return DeploymentActiveAfter(pindexPrev, chainman.GetConsensus(), dep); + return DeploymentActiveAfter(pindexPrev, chainman.GetConsensus(), dep, chainman.m_versionbitscache); } template<typename DEP> bool DeploymentActiveAt(const CBlockIndex& index, const ChainstateManager& chainman, DEP dep) { - return DeploymentActiveAt(index, chainman.GetConsensus(), dep); + return DeploymentActiveAt(index, chainman.GetConsensus(), dep, chainman.m_versionbitscache); } template<typename DEP> |