diff options
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> |