Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
versionbits.h
Go to the documentation of this file.
64 BIP9Stats GetStateStatisticsFor(const CBlockIndex* pindex, const Consensus::Params& params, ThresholdConditionCache& cache) const;
65 // Note that the functions below take a pindexPrev as input: they compute information for block B based on its parent.
66 ThresholdState GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const;
67 int GetStateSinceHeightFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const;
77 ThresholdState VersionBitsState(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache);
78 BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache);
79 int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache);
Definition: versionbits.h:42
Definition: versionbits.h:33
virtual int64_t EndTime(const Consensus::Params ¶ms) const =0
int GetStateSinceHeightFor(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const
Definition: versionbits.cpp:178
Definition: versionbits.h:22
bool gbt_force
Whether GBT clients can safely ignore this rule in simplified usage.
Definition: versionbits.h:37
static const int32_t VERSIONBITS_TOP_MASK
What bitmask determines whether versionbits is in use.
Definition: versionbits.h:16
Definition: versionbits.h:23
const struct VBDeploymentInfo VersionBitsDeploymentInfo[]
Definition: versionbits.cpp:8
virtual bool Condition(const CBlockIndex *pindex, const Consensus::Params ¶ms) const =0
Definition: versionbits.h:25
virtual int Threshold(const Consensus::Params ¶ms, int nAttempt) const =0
ThresholdConditionCache caches[Consensus::MAX_VERSION_BITS_DEPLOYMENTS]
Definition: versionbits.h:72
BIP9Stats GetStateStatisticsFor(const CBlockIndex *pindex, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const
Definition: versionbits.cpp:140
BIP9Stats VersionBitsStatistics(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos, VersionBitsCache &cache)
Definition: versionbits.cpp:250
Definition: versionbits.h:70
ThresholdState VersionBitsState(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos, VersionBitsCache &cache)
Definition: versionbits.cpp:245
Abstract class that implements BIP9-style threshold logic, and caches results.
Definition: versionbits.h:55
std::map< const CBlockIndex *, ThresholdState > ThresholdConditionCache
Definition: versionbits.h:31
Definition: versionbits.h:24
ThresholdState GetStateFor(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const
Definition: versionbits.cpp:46
int VersionBitsStateSinceHeight(const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos, VersionBitsCache &cache)
Definition: versionbits.cpp:255
Definition: versionbits.h:21
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
static const int32_t VERSIONBITS_LAST_OLD_BLOCK_VERSION
What block version to use for new blocks (pre versionbits)
Definition: versionbits.h:12
static const int32_t VERSIONBITS_TOP_BITS
What bits to set in version for versionbits blocks.
Definition: versionbits.h:14
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)
Definition: versionbits.cpp:260
static const int32_t VERSIONBITS_NUM_BITS
Total bits available for versionbits.
Definition: versionbits.h:18