Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

versionbits.h File Reference
#include <chain.h>
#include <map>
+ Include dependency graph for versionbits.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VBDeploymentInfo
 
struct  BIP9Stats
 
class  AbstractThresholdConditionChecker
 Abstract class that implements BIP9-style threshold logic, and caches results. More...
 
struct  VersionBitsCache
 

Typedefs

typedef std::map< const CBlockIndex *, ThresholdStateThresholdConditionCache
 

Enumerations

enum  ThresholdState {
  THRESHOLD_DEFINED, THRESHOLD_STARTED, THRESHOLD_LOCKED_IN, THRESHOLD_ACTIVE,
  THRESHOLD_FAILED
}
 

Functions

ThresholdState VersionBitsState (const CBlockIndex *pindexPrev, const Consensus::Params &params, Consensus::DeploymentPos pos, VersionBitsCache &cache)
 
BIP9Stats VersionBitsStatistics (const CBlockIndex *pindexPrev, const Consensus::Params &params, Consensus::DeploymentPos pos, VersionBitsCache &cache)
 
int VersionBitsStateSinceHeight (const CBlockIndex *pindexPrev, const Consensus::Params &params, Consensus::DeploymentPos pos, VersionBitsCache &cache)
 
uint32_t VersionBitsMask (const Consensus::Params &params, Consensus::DeploymentPos pos)
 

Variables

static const int32_t VERSIONBITS_LAST_OLD_BLOCK_VERSION = 4
 What block version to use for new blocks (pre versionbits) More...
 
static const int32_t VERSIONBITS_TOP_BITS = 0x20000000UL
 What bits to set in version for versionbits blocks. More...
 
static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL
 What bitmask determines whether versionbits is in use. More...
 
static const int32_t VERSIONBITS_NUM_BITS = 29
 Total bits available for versionbits. More...
 
const struct VBDeploymentInfo VersionBitsDeploymentInfo []
 

Typedef Documentation

◆ ThresholdConditionCache

Definition at line 31 of file versionbits.h.

Enumeration Type Documentation

◆ ThresholdState

Enumerator
THRESHOLD_DEFINED 
THRESHOLD_STARTED 
THRESHOLD_LOCKED_IN 
THRESHOLD_ACTIVE 
THRESHOLD_FAILED 

Definition at line 20 of file versionbits.h.

Function Documentation

◆ VersionBitsMask()

uint32_t VersionBitsMask ( const Consensus::Params params,
Consensus::DeploymentPos  pos 
)

Definition at line 260 of file versionbits.cpp.

Referenced by ComputeBlockVersion(), and getblocktemplate().

◆ VersionBitsState()

◆ VersionBitsStateSinceHeight()

int VersionBitsStateSinceHeight ( const CBlockIndex pindexPrev,
const Consensus::Params params,
Consensus::DeploymentPos  pos,
VersionBitsCache cache 
)

◆ VersionBitsStatistics()

BIP9Stats VersionBitsStatistics ( const CBlockIndex pindexPrev,
const Consensus::Params params,
Consensus::DeploymentPos  pos,
VersionBitsCache cache 
)

Definition at line 250 of file versionbits.cpp.

References VersionBitsCache::caches.

Referenced by VersionBitsTipStatistics().

Variable Documentation

◆ VERSIONBITS_LAST_OLD_BLOCK_VERSION

const int32_t VERSIONBITS_LAST_OLD_BLOCK_VERSION = 4
static

What block version to use for new blocks (pre versionbits)

Definition at line 12 of file versionbits.h.

Referenced by UpdateTip().

◆ VERSIONBITS_NUM_BITS

const int32_t VERSIONBITS_NUM_BITS = 29
static

Total bits available for versionbits.

Definition at line 18 of file versionbits.h.

Referenced by UnloadBlockIndex(), and UpdateTip().

◆ VERSIONBITS_TOP_BITS

const int32_t VERSIONBITS_TOP_BITS = 0x20000000UL
static

What bits to set in version for versionbits blocks.

Definition at line 14 of file versionbits.h.

Referenced by ComputeBlockVersion(), and WarningBitsConditionChecker::Condition().

◆ VERSIONBITS_TOP_MASK

const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL
static

What bitmask determines whether versionbits is in use.

Definition at line 16 of file versionbits.h.

Referenced by WarningBitsConditionChecker::Condition().

◆ VersionBitsDeploymentInfo

const struct VBDeploymentInfo VersionBitsDeploymentInfo[]
Released under the MIT license