Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Abstract class that implements BIP9-style threshold logic, and caches results. More...
#include <versionbits.h>
Public Member Functions | |
BIP9Stats | GetStateStatisticsFor (const CBlockIndex *pindex, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const |
ThresholdState | GetStateFor (const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const |
int | GetStateSinceHeightFor (const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, ThresholdConditionCache &cache) const |
Protected Member Functions | |
virtual bool | Condition (const CBlockIndex *pindex, const Consensus::Params ¶ms) const =0 |
virtual int64_t | BeginTime (const Consensus::Params ¶ms) const =0 |
virtual int64_t | EndTime (const Consensus::Params ¶ms) const =0 |
virtual int | Period (const Consensus::Params ¶ms) const =0 |
virtual int | Threshold (const Consensus::Params ¶ms, int nAttempt) const =0 |
Detailed Description
Abstract class that implements BIP9-style threshold logic, and caches results.
Definition at line 55 of file versionbits.h.
Member Function Documentation
◆ BeginTime()
|
protectedpure virtual |
Implemented in WarningBitsConditionChecker.
Referenced by GetStateFor().
◆ Condition()
|
protectedpure virtual |
Implemented in WarningBitsConditionChecker.
Referenced by GetStateFor(), and GetStateStatisticsFor().
◆ EndTime()
|
protectedpure virtual |
Implemented in WarningBitsConditionChecker.
Referenced by GetStateFor().
◆ GetStateFor()
ThresholdState AbstractThresholdConditionChecker::GetStateFor | ( | const CBlockIndex * | pindexPrev, |
const Consensus::Params & | params, | ||
ThresholdConditionCache & | cache | ||
) | const |
Definition at line 46 of file versionbits.cpp.
References BeginTime(), Condition(), count, EndTime(), CBlockIndex::GetAncestor(), CBlockIndex::GetMedianTimePast(), CBlockIndex::nHeight, Period(), CBlockIndex::pprev, Threshold(), THRESHOLD_ACTIVE, THRESHOLD_DEFINED, THRESHOLD_FAILED, THRESHOLD_LOCKED_IN, and THRESHOLD_STARTED.
Referenced by GetStateSinceHeightFor(), GetStateStatisticsFor(), and UpdateTip().
◆ GetStateSinceHeightFor()
int AbstractThresholdConditionChecker::GetStateSinceHeightFor | ( | const CBlockIndex * | pindexPrev, |
const Consensus::Params & | params, | ||
ThresholdConditionCache & | cache | ||
) | const |
Definition at line 178 of file versionbits.cpp.
References CBlockIndex::GetAncestor(), GetStateFor(), CBlockIndex::nHeight, Period(), and THRESHOLD_DEFINED.
Referenced by GetStateStatisticsFor().
◆ GetStateStatisticsFor()
BIP9Stats AbstractThresholdConditionChecker::GetStateStatisticsFor | ( | const CBlockIndex * | pindex, |
const Consensus::Params & | params, | ||
ThresholdConditionCache & | cache | ||
) | const |
Definition at line 140 of file versionbits.cpp.
References Condition(), count, BIP9Stats::count, BIP9Stats::elapsed, CBlockIndex::GetAncestor(), GetStateFor(), GetStateSinceHeightFor(), CBlockIndex::nHeight, BIP9Stats::period, Period(), BIP9Stats::possible, CBlockIndex::pprev, BIP9Stats::threshold, Threshold(), and THRESHOLD_STARTED.
◆ Period()
|
protectedpure virtual |
Implemented in WarningBitsConditionChecker.
Referenced by GetStateFor(), GetStateSinceHeightFor(), and GetStateStatisticsFor().
◆ Threshold()
|
protectedpure virtual |
Implemented in WarningBitsConditionChecker.
Referenced by GetStateFor(), and GetStateStatisticsFor().
The documentation for this class was generated from the following files:
- src/versionbits.h
- src/versionbits.cpp