Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
versionbits.cpp File Reference
#include <consensus/params.h>
#include <deploymentinfo.h>
#include <kernel/chainparams.h>
#include <util/check.h>
#include <versionbits.h>
#include <versionbits_impl.h>
Include dependency graph for versionbits.cpp:

Go to the source code of this file.

Enumerations

enum class  ThresholdState
 BIP 9 defines a finite-state-machine to deploy a softfork in multiple stages. More...

Functions

std::string StateName (ThresholdState state)
 Get a string with the state name.
static int32_t ComputeBlockVersion (const CBlockIndex *pindexPrev, const Consensus::Params &params, std::array< ThresholdConditionCache, Consensus::MAX_VERSION_BITS_DEPLOYMENTS > &caches)

Enumeration Type Documentation

◆ ThresholdState

enum class ThresholdState : uint8_t
strong

BIP 9 defines a finite-state-machine to deploy a softfork in multiple stages.

State transitions happen during retarget period if conditions are met In case of reorg, transitions can go backward. Without transition, state is inherited between periods. All blocks of a period share the same state.

Definition at line 17 of file versionbits_impl.h.

Function Documentation

◆ ComputeBlockVersion()

int32_t ComputeBlockVersion ( const CBlockIndex * pindexPrev,
const Consensus::Params & params,
std::array< ThresholdConditionCache, Consensus::MAX_VERSION_BITS_DEPLOYMENTS > & caches )
static

Definition at line 265 of file versionbits.cpp.

Here is the call graph for this function:

◆ StateName()

std::string StateName ( ThresholdState state)

Get a string with the state name.

Definition at line 14 of file versionbits.cpp.

Here is the caller graph for this function: