Bitcoin ABC  0.24.7
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
BlockStatus Struct Reference

#include <blockstatus.h>

Public Member Functions

constexpr BlockStatus ()
 
BlockValidity getValidity () const
 
BlockStatus withValidity (BlockValidity validity) const
 
bool hasData () const
 
BlockStatus withData (bool hasData=true) const
 
bool hasUndo () const
 
BlockStatus withUndo (bool hasUndo=true) const
 
bool hasFailed () const
 
BlockStatus withFailed (bool hasFailed=true) const
 
bool hasFailedParent () const
 
BlockStatus withFailedParent (bool hasFailedParent=true) const
 
bool isParked () const
 
BlockStatus withParked (bool parked=true) const
 
bool hasParkedParent () const
 
BlockStatus withParkedParent (bool parkedParent=true) const
 
bool isValid (enum BlockValidity nUpTo=BlockValidity::TRANSACTIONS) const
 Check whether this block index entry is valid up to the passed validity level. More...
 
bool isInvalid () const
 
BlockStatus withClearedFailureFlags () const
 
bool isOnParkedChain () const
 
BlockStatus withClearedParkedFlags () const
 
 SERIALIZE_METHODS (BlockStatus, obj)
 

Private Member Functions

constexpr BlockStatus (uint32_t nStatusIn)
 

Private Attributes

uint32_t status
 

Static Private Attributes

static const uint32_t VALIDITY_MASK = 0x07
 
static const uint32_t HAS_DATA_FLAG = 0x08
 
static const uint32_t HAS_UNDO_FLAG = 0x10
 
static const uint32_t FAILED_FLAG = 0x20
 
static const uint32_t FAILED_PARENT_FLAG = 0x40
 
static const uint32_t INVALID_MASK = FAILED_FLAG | FAILED_PARENT_FLAG
 
static const uint32_t PARKED_FLAG = 0x80
 
static const uint32_t PARKED_PARENT_FLAG = 0x100
 
static const uint32_t PARKED_MASK = PARKED_FLAG | PARKED_PARENT_FLAG
 

Friends

constexpr friend bool operator== (const BlockStatus a, const BlockStatus b)
 
constexpr friend bool operator!= (const BlockStatus a, const BlockStatus b)
 

Detailed Description

Definition at line 13 of file blockstatus.h.

Constructor & Destructor Documentation

◆ BlockStatus() [1/2]

constexpr BlockStatus::BlockStatus ( uint32_t  nStatusIn)
inlineexplicitconstexprprivate

Definition at line 17 of file blockstatus.h.

◆ BlockStatus() [2/2]

constexpr BlockStatus::BlockStatus ( )
inlineexplicitconstexpr

Definition at line 44 of file blockstatus.h.

Here is the caller graph for this function:

Member Function Documentation

◆ getValidity()

BlockValidity BlockStatus::getValidity ( ) const
inline

Definition at line 46 of file blockstatus.h.

Here is the caller graph for this function:

◆ hasData()

bool BlockStatus::hasData ( ) const
inline

Definition at line 54 of file blockstatus.h.

Here is the caller graph for this function:

◆ hasFailed()

bool BlockStatus::hasFailed ( ) const
inline

Definition at line 66 of file blockstatus.h.

Here is the caller graph for this function:

◆ hasFailedParent()

bool BlockStatus::hasFailedParent ( ) const
inline

Definition at line 72 of file blockstatus.h.

Here is the caller graph for this function:

◆ hasParkedParent()

bool BlockStatus::hasParkedParent ( ) const
inline

Definition at line 84 of file blockstatus.h.

◆ hasUndo()

bool BlockStatus::hasUndo ( ) const
inline

Definition at line 60 of file blockstatus.h.

Here is the caller graph for this function:

◆ isInvalid()

bool BlockStatus::isInvalid ( ) const
inline

Definition at line 102 of file blockstatus.h.

Here is the caller graph for this function:

◆ isOnParkedChain()

bool BlockStatus::isOnParkedChain ( ) const
inline

Definition at line 107 of file blockstatus.h.

Here is the caller graph for this function:

◆ isParked()

bool BlockStatus::isParked ( ) const
inline

Definition at line 78 of file blockstatus.h.

Here is the caller graph for this function:

◆ isValid()

bool BlockStatus::isValid ( enum BlockValidity  nUpTo = BlockValidity::TRANSACTIONS) const
inline

Check whether this block index entry is valid up to the passed validity level.

Definition at line 94 of file blockstatus.h.

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

◆ SERIALIZE_METHODS()

BlockStatus::SERIALIZE_METHODS ( BlockStatus  ,
obj   
)
inline

Definition at line 112 of file blockstatus.h.

◆ withClearedFailureFlags()

BlockStatus BlockStatus::withClearedFailureFlags ( ) const
inline

Definition at line 103 of file blockstatus.h.

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

◆ withClearedParkedFlags()

BlockStatus BlockStatus::withClearedParkedFlags ( ) const
inline

Definition at line 108 of file blockstatus.h.

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

◆ withData()

BlockStatus BlockStatus::withData ( bool  hasData = true) const
inline

Definition at line 55 of file blockstatus.h.

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

◆ withFailed()

BlockStatus BlockStatus::withFailed ( bool  hasFailed = true) const
inline

Definition at line 67 of file blockstatus.h.

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

◆ withFailedParent()

BlockStatus BlockStatus::withFailedParent ( bool  hasFailedParent = true) const
inline

Definition at line 73 of file blockstatus.h.

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

◆ withParked()

BlockStatus BlockStatus::withParked ( bool  parked = true) const
inline

Definition at line 79 of file blockstatus.h.

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

◆ withParkedParent()

BlockStatus BlockStatus::withParkedParent ( bool  parkedParent = true) const
inline

Definition at line 85 of file blockstatus.h.

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

◆ withUndo()

BlockStatus BlockStatus::withUndo ( bool  hasUndo = true) const
inline

Definition at line 61 of file blockstatus.h.

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

◆ withValidity()

BlockStatus BlockStatus::withValidity ( BlockValidity  validity) const
inline

Definition at line 50 of file blockstatus.h.

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

Friends And Related Function Documentation

◆ operator!=

constexpr friend bool operator!= ( const BlockStatus  a,
const BlockStatus  b 
)
friend

Definition at line 118 of file blockstatus.h.

◆ operator==

constexpr friend bool operator== ( const BlockStatus  a,
const BlockStatus  b 
)
friend

Definition at line 114 of file blockstatus.h.

Member Data Documentation

◆ FAILED_FLAG

const uint32_t BlockStatus::FAILED_FLAG = 0x20
staticprivate

Definition at line 27 of file blockstatus.h.

◆ FAILED_PARENT_FLAG

const uint32_t BlockStatus::FAILED_PARENT_FLAG = 0x40
staticprivate

Definition at line 29 of file blockstatus.h.

◆ HAS_DATA_FLAG

const uint32_t BlockStatus::HAS_DATA_FLAG = 0x08
staticprivate

Definition at line 22 of file blockstatus.h.

◆ HAS_UNDO_FLAG

const uint32_t BlockStatus::HAS_UNDO_FLAG = 0x10
staticprivate

Definition at line 24 of file blockstatus.h.

◆ INVALID_MASK

const uint32_t BlockStatus::INVALID_MASK = FAILED_FLAG | FAILED_PARENT_FLAG
staticprivate

Definition at line 32 of file blockstatus.h.

◆ PARKED_FLAG

const uint32_t BlockStatus::PARKED_FLAG = 0x80
staticprivate

Definition at line 36 of file blockstatus.h.

◆ PARKED_MASK

const uint32_t BlockStatus::PARKED_MASK = PARKED_FLAG | PARKED_PARENT_FLAG
staticprivate

Definition at line 41 of file blockstatus.h.

◆ PARKED_PARENT_FLAG

const uint32_t BlockStatus::PARKED_PARENT_FLAG = 0x100
staticprivate

Definition at line 38 of file blockstatus.h.

◆ status

uint32_t BlockStatus::status
private

Definition at line 15 of file blockstatus.h.

◆ VALIDITY_MASK

const uint32_t BlockStatus::VALIDITY_MASK = 0x07
staticprivate

Definition at line 19 of file blockstatus.h.


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