[#node-BlockManager-AddToBlockIndex] = xref:node.adoc[node]::xref:node/BlockManager.adoc[BlockManager]::AddToBlockIndex :relfileprefix: ../../ :mrdocs: Add a block header to the in‐memory block index, updating the best header. == Synopsis Declared in `<node/blockstorage.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[requires_capability(0x7f2e1b098fc8), requires_capability(0x7f2e26d1a728), requires_capability(0x7f2e375e0808), requires_capability(0x7f2e33367bc8), requires_capability(0x7f2e3542ebb8), requires_capability(0x7f2e28a73718)]] xref:CBlockIndex.adoc[CBlockIndex]* AddToBlockIndex( xref:CBlockHeader.adoc[CBlockHeader] const& block, xref:CBlockIndex.adoc[CBlockIndex]*& best_header); ---- == Return Value The block index entry for `block.` == Parameters [cols="1,4"] |=== | Name| Description | *block* | The block header to add. | *best_header* | Reference to the best‐header pointer, updated if this block is better. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#