5 #ifndef BITCOIN_VERSIONBITS_H 6 #define BITCOIN_VERSIONBITS_H 12 static const int32_t VERSIONBITS_LAST_OLD_BLOCK_VERSION = 4;
14 static const int32_t VERSIONBITS_TOP_BITS = 0x20000000UL;
16 static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL;
18 static const int32_t VERSIONBITS_NUM_BITS = 29;
71 #endif // BITCOIN_VERSIONBITS_H
virtual int64_t EndTime(const Consensus::Params ¶ms) const =0
int GetStateSinceHeightFor(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const
virtual bool Condition(const CBlockIndex *pindex, const Consensus::Params ¶ms) const =0
ThresholdConditionCache caches[Consensus::MAX_VERSION_BITS_DEPLOYMENTS]
BIP9Stats VersionBitsStatistics(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos)
ThresholdState VersionBitsState(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos, VersionBitsCache &cache)
Abstract class that implements BIP9-style threshold logic, and caches results.
Parameters that influence chain consensus.
virtual int Threshold(const Consensus::Params ¶ms) const =0
std::map< const CBlockIndex *, ThresholdState > ThresholdConditionCache
BIP9Stats GetStateStatisticsFor(const CBlockIndex *pindex, const Consensus::Params ¶ms) const
ThresholdState GetStateFor(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const
int VersionBitsStateSinceHeight(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos, VersionBitsCache &cache)
The block chain is a tree shaped structure starting with the genesis block at the root...
virtual int64_t BeginTime(const Consensus::Params ¶ms) const =0
virtual int Period(const Consensus::Params ¶ms) const =0
uint32_t VersionBitsMask(const Consensus::Params ¶ms, Consensus::DeploymentPos pos)