Bit flags describing how far a block has been validated and which data is available for it.

Synopsis

Declared in <chain.h>

enum BlockStatus : uint32_t;

Members

Name

Description

BLOCK_VALID_UNKNOWN

Unused.

BLOCK_VALID_RESERVED

Reserved (was BLOCK_VALID_HEADER).

BLOCK_VALID_TREE

All parent headers found, difficulty matches, timestamp >= median previous. Implies all parents are also at least TREE.

BLOCK_VALID_TRANSACTIONS

Only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids, sigops, size, merkle root. Implies all parents are at least TREE but not necessarily TRANSACTIONS.

BLOCK_VALID_CHAIN

Outputs do not overspend inputs, no double spends, coinbase output ok, no immature coinbase spends, BIP30. Implies all previous blocks back to the genesis block or an assumeutxo snapshot block are at least VALID_CHAIN.

BLOCK_VALID_SCRIPTS

Scripts & signatures ok. Implies all previous blocks back to the genesis block or an assumeutxo snapshot block are at least VALID_SCRIPTS.

BLOCK_VALID_MASK

All validity bits.

BLOCK_HAVE_DATA

full block available in blk*.dat

BLOCK_HAVE_UNDO

undo data available in rev*.dat

BLOCK_HAVE_MASK

combined mask of the block‐data availability flags

BLOCK_FAILED_VALID

stage after last reached validness failed

BLOCK_FAILED_CHILD

Unused flag that was previously set when descending from failed block

BLOCK_OPT_WITNESS

block data in blk*.dat was received with a witness‐enforcing client

BLOCK_STATUS_RESERVED

Unused flag that was previously set on assumeutxo snapshot blocks and their ancestors before they were validated, and unset when they were validated.

Created with MrDocs