NextEmptyBlockIndex

Return an empty block index on top of the tip, with height, time and nBits set

Synopsis

Declared in <rpc/server_util.h>

void
NextEmptyBlockIndex(
    CBlockIndex& tip,
    Consensus::Params const& consensusParams,
    CBlockIndex& next_index);

Return Value

an empty block index on top of the tip, with height, time and nBits set

Parameters

NameDescription
tipThe current chain tip to build on top of.
consensusParamsConsensus parameters used to set the new block's fields.
next_indexOutput block index initialized to sit on top of tip.