Chainstate::Chainstate

Construct a chainstate.

Synopsis

Declared in <validation.h>

explicit
Chainstate(
    CTxMemPool* mempool,
    node::BlockManager& blockman,
    ChainstateManager& chainman,
    std::optional<uint256> from_snapshot_blockhash = std::nullopt);

Parameters

NameDescription
mempoolOptional mempool kept in sync with this chainstate (only the active chainstate has one).
blockmanBlockManager instance shared across all chainstates.
chainmanThe chainstate manager that owns this chainstate.
from_snapshot_blockhashBase block hash if this chainstate was created from a snapshot, otherwise std::nullopt.