kernel::BlockTreeDB::LoadBlockIndexGuts

Load every block-index entry from the database into memory.

Synopsis

Declared in <node/blockstorage.h>

[[requires_capability(0x7fb97d3ef398), requires_capability(0x7fb9865650e8), requires_capability(0x7fb979460378), requires_capability(0x7fb96affe568), requires_capability(0x7fb97bba5908), requires_capability(0x7fb98655c268)]]
bool
LoadBlockIndexGuts(
    Consensus::Params const& consensusParams,
    std::function<CBlockIndex*(uint256 const&)> insertBlockIndex,
    util::SignalInterrupt const& interrupt);

Return Value

True on success, false if loading failed or was interrupted.

Parameters

NameDescription
consensusParamsConsensus parameters used to interpret the stored entries.
insertBlockIndexCallback that inserts a block index for a given hash and returns it.
interruptInterrupt used to abort a long-running load.