[#Chainstate-ConnectTip] = xref:Chainstate.adoc[Chainstate]::ConnectTip :relfileprefix: ../ :mrdocs: Connect a single block to the tip, updating the mempool and coins view. == Synopsis Declared in `<validation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[requires_capability(0x7f2e1ba85620, 0x7f2e1ba85698), requires_capability(0x7f2e14565270, 0x7f2e145652e8), requires_capability(0x7f2e373be420, 0x7f2e373be498), requires_capability(0x7f2e36e35070, 0x7f2e36e350e8)]] bool ConnectTip( xref:BlockValidationState.adoc[BlockValidationState]& state, xref:CBlockIndex.adoc[CBlockIndex]* pindexNew, std::shared_ptr<CBlock const> block_to_connect, std::vector<ConnectedBlock>& connected_blocks, xref:DisconnectedBlockTransactions.adoc[DisconnectedBlockTransactions]& disconnectpool); ---- == Return Value true unless a system error occurred. == Parameters [cols="1,4"] |=== | Name| Description | *state* | Validation state updated with the reason for any failure. | *pindexNew* | Block index entry of the block being connected. | *block_to_connect* | The block to connect to the tip. | *connected_blocks* | Collects the blocks connected during activation. | *disconnectpool* | Collects transactions from any disconnected blocks for reprocessing. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#