Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
VersionBitsConditionChecker Class Reference

Class to implement versionbits logic. More...

#include <versionbits_impl.h>

Inheritance diagram for VersionBitsConditionChecker:
[legend]
Collaboration diagram for VersionBitsConditionChecker:
[legend]

Public Member Functions

 VersionBitsConditionChecker (const Consensus::BIP9Deployment &dep)
 VersionBitsConditionChecker (const Consensus::Params &params, Consensus::DeploymentPos id)
uint32_t Mask () const
bool Condition (int32_t nVersion) const
Public Member Functions inherited from AbstractThresholdConditionChecker
virtual ~AbstractThresholdConditionChecker ()=default
BIP9Stats GetStateStatisticsFor (const CBlockIndex *pindex, std::vector< bool > *signalling_blocks=nullptr) const
 Returns the numerical statistics of an in-progress BIP9 softfork in the period including pindex If provided, signalling_blocks is set to true/false based on whether each block in the period signalled.
ThresholdState GetStateFor (const CBlockIndex *pindexPrev, ThresholdConditionCache &cache) const
 Returns the state for pindex A based on parent pindexPrev B.
int GetStateSinceHeightFor (const CBlockIndex *pindexPrev, ThresholdConditionCache &cache) const
 Returns the height since when the ThresholdState has started for pindex A based on parent pindexPrev B, all blocks of a period share the same.

Protected Member Functions

int64_t BeginTime () const override
int64_t EndTime () const override
int MinActivationHeight () const override
int Period () const override
int Threshold () const override
bool Condition (const CBlockIndex *pindex) const override

Private Attributes

const Consensus::BIP9Deploymentdep

Detailed Description

Class to implement versionbits logic.

Definition at line 57 of file versionbits_impl.h.

Constructor & Destructor Documentation

◆ VersionBitsConditionChecker() [1/2]

VersionBitsConditionChecker::VersionBitsConditionChecker ( const Consensus::BIP9Deployment & dep)
inlineexplicit

Definition at line 74 of file versionbits_impl.h.

Here is the caller graph for this function:

◆ VersionBitsConditionChecker() [2/2]

VersionBitsConditionChecker::VersionBitsConditionChecker ( const Consensus::Params & params,
Consensus::DeploymentPos id )
inlineexplicit

Definition at line 75 of file versionbits_impl.h.

Here is the call graph for this function:

Member Function Documentation

◆ BeginTime()

int64_t VersionBitsConditionChecker::BeginTime ( ) const
inlineoverrideprotectedvirtual

Implements AbstractThresholdConditionChecker.

Definition at line 62 of file versionbits_impl.h.

◆ Condition() [1/2]

bool VersionBitsConditionChecker::Condition ( const CBlockIndex * pindex) const
inlineoverrideprotectedvirtual

Implements AbstractThresholdConditionChecker.

Definition at line 68 of file versionbits_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Condition() [2/2]

bool VersionBitsConditionChecker::Condition ( int32_t nVersion) const
inline

Definition at line 79 of file versionbits_impl.h.

Here is the call graph for this function:

◆ EndTime()

int64_t VersionBitsConditionChecker::EndTime ( ) const
inlineoverrideprotectedvirtual

Implements AbstractThresholdConditionChecker.

Definition at line 63 of file versionbits_impl.h.

◆ Mask()

uint32_t VersionBitsConditionChecker::Mask ( ) const
inline

Definition at line 77 of file versionbits_impl.h.

Here is the caller graph for this function:

◆ MinActivationHeight()

int VersionBitsConditionChecker::MinActivationHeight ( ) const
inlineoverrideprotectedvirtual

Reimplemented from AbstractThresholdConditionChecker.

Definition at line 64 of file versionbits_impl.h.

◆ Period()

int VersionBitsConditionChecker::Period ( ) const
inlineoverrideprotectedvirtual

Implements AbstractThresholdConditionChecker.

Definition at line 65 of file versionbits_impl.h.

◆ Threshold()

int VersionBitsConditionChecker::Threshold ( ) const
inlineoverrideprotectedvirtual

Implements AbstractThresholdConditionChecker.

Definition at line 66 of file versionbits_impl.h.

Member Data Documentation

◆ dep

const Consensus::BIP9Deployment& VersionBitsConditionChecker::dep
private

Definition at line 59 of file versionbits_impl.h.


The documentation for this class was generated from the following file: