Bitcoin
Classes | Typedefs | Enumerations | Functions | Variables
versionbits.h File Reference
#include <chain.h>
#include <map>

Go to the source code of this file.

Classes

struct  BIP9Stats
 
class  AbstractThresholdConditionChecker
 
struct  VersionBitsCache
 

Typedefs

typedef std::map< const CBlockIndex *, ThresholdStateThresholdConditionCache
 

Enumerations

enum  ThresholdState {
  ThresholdState::DEFINED, ThresholdState::STARTED, ThresholdState::LOCKED_IN, ThresholdState::ACTIVE,
  ThresholdState::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)
 
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
 
static const int32_t VERSIONBITS_TOP_BITS = 0x20000000UL
 
static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL
 
static const int32_t VERSIONBITS_NUM_BITS = 29
 

Typedef Documentation

◆ ThresholdConditionCache

Enumeration Type Documentation

◆ ThresholdState

enum ThresholdState
strong
Enumerator
DEFINED 
STARTED 
LOCKED_IN 
ACTIVE 
FAILED 

Function Documentation

◆ VersionBitsMask()

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

◆ VersionBitsState()

ThresholdState VersionBitsState ( const CBlockIndex pindexPrev,
const Consensus::Params params,
Consensus::DeploymentPos  pos,
VersionBitsCache cache 
)

◆ 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 
)

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)

◆ VERSIONBITS_NUM_BITS

const int32_t VERSIONBITS_NUM_BITS = 29
static

Total bits available for versionbits

◆ VERSIONBITS_TOP_BITS

const int32_t VERSIONBITS_TOP_BITS = 0x20000000UL
static

What bits to set in version for versionbits blocks

◆ VERSIONBITS_TOP_MASK

const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL
static

What bitmask determines whether versionbits is in use