CBlockIndex::GetAncestor

Efficiently finds an ancestor of this block.

Synopsis

Declared in <chain.h>

CBlockIndex const*
GetAncestor(int height) const;

Return Value

The ancestor at the given height, or nullptr if none exists.

Parameters

NameDescription
heightThe height of the ancestor to find.