[#ChainstateManager-BlocksAheadOfTip] = xref:ChainstateManager.adoc[ChainstateManager]::BlocksAheadOfTip :relfileprefix: ../ :mrdocs: Returns how many blocks the best header is ahead of the current tip, or nullopt if the best header does not extend the tip. == Synopsis Declared in `<validation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[locks_excluded(0x7f2e1bc183b8), locks_excluded(0x7f2e146b6708), locks_excluded(0x7f2e298fbad8), locks_excluded(0x7f2e360b9238)]] std::optional<int> BlocksAheadOfTip() const; ---- == Return Value The number of blocks the best header is ahead of the tip, or std::nullopt. [.small]#Created with https://www.mrdocs.com[MrDocs]#