ChainstateManager::BlocksAheadOfTip

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>

[[locks_excluded(0x7fb95fbcbd58), locks_excluded(0x7fb96adf4d28), locks_excluded(0x7fb96eb27ea8), locks_excluded(0x7fb987169638)]]
std::optional<int>
BlocksAheadOfTip() const;

Return Value

The number of blocks the best header is ahead of the tip, or std::nullopt.