node::BlockManager::AddToBlockIndex

Add a block header to the in-memory block index, updating the best header.

Synopsis

Declared in <node/blockstorage.h>

[[requires_capability(0x7fb95f04cc58), requires_capability(0x7fb969da6a18), requires_capability(0x7fb96c563468), requires_capability(0x7fb9857a0528), requires_capability(0x7fb96cb95e38), requires_capability(0x7fb95a5b9388)]]
CBlockIndex*
AddToBlockIndex(
    CBlockHeader const& block,
    CBlockIndex*& best_header);

Return Value

The block index entry for block.

Parameters

NameDescription
blockThe block header to add.
best_headerReference to the best-header pointer, updated if this block is better.