5 #ifndef BITCOIN_BLOCKSTATUS_H 6 #define BITCOIN_BLOCKSTATUS_H 17 explicit constexpr
BlockStatus(uint32_t nStatusIn) : status(nStatusIn) {}
51 return BlockStatus((status & ~VALIDITY_MASK) | uint32_t(validity));
81 (parked ? PARKED_FLAG : 0));
87 (parkedParent ? PARKED_PARENT_FLAG : 0));
114 template <
typename Stream,
typename Operation>
128 #endif // BITCOIN_BLOCKSTATUS_H
BlockStatus withFailed(bool hasFailed=true) const
void SerializationOp(Stream &s, Operation ser_action)
BlockStatus withFailedParent(bool hasFailedParent=true) const
static const uint32_t INVALID_MASK
BlockStatus withValidity(BlockValidity validity) const
BlockStatus withUndo(bool hasUndo=true) const
bool hasParkedParent() const
BlockStatus withParkedParent(bool parkedParent=true) const
static const uint32_t PARKED_PARENT_FLAG
static const uint32_t HAS_DATA_FLAG
friend constexpr bool operator==(const BlockStatus a, const BlockStatus b)
static const uint32_t FAILED_PARENT_FLAG
BlockStatus withClearedFailureFlags() const
Only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid...
bool hasFailedParent() const
bool isOnParkedChain() const
static const uint32_t FAILED_FLAG
friend constexpr bool operator!=(const BlockStatus a, const BlockStatus b)
static const uint32_t HAS_UNDO_FLAG
BlockStatus withParked(bool parked=true) const
static const uint32_t PARKED_FLAG
BlockValidity getValidity() const
static const uint32_t PARKED_MASK
BlockStatus withClearedParkedFlags() const
bool isValid(enum BlockValidity nUpTo=BlockValidity::TRANSACTIONS) const
Check whether this block index entry is valid up to the passed validity level.
BlockStatus withData(bool hasData=true) const
static const uint32_t VALIDITY_MASK
constexpr BlockStatus(uint32_t nStatusIn)