Chainstate::ConnectTip

Connect a single block to the tip, updating the mempool and coins view.

Synopsis

Declared in <validation.h>

[[requires_capability(0x7fd753c9cb50, 0x7fd753c9cbc8), requires_capability(0x7fd74db5e620, 0x7fd74db5e698), requires_capability(0x7fd74ab60640, 0x7fd74ab606b8), requires_capability(0x7fd73ea7b500, 0x7fd73ea7b578)]]
bool
ConnectTip(
    BlockValidationState& state,
    CBlockIndex* pindexNew,
    std::shared_ptr<CBlock const> block_to_connect,
    std::vector<ConnectedBlock>& connected_blocks,
    DisconnectedBlockTransactions& disconnectpool);

Return Value

true unless a system error occurred.

Parameters

NameDescription
stateValidation state updated with the reason for any failure.
pindexNewBlock index entry of the block being connected.
block_to_connectThe block to connect to the tip.
connected_blocksCollects the blocks connected during activation.
disconnectpoolCollects transactions from any disconnected blocks for reprocessing.