CBlockIndex::GetAncestor

Efficiently find an ancestor of this block.

Synopsis

Declared in <chain.h>

CBlockIndex*
GetAncestor(int height);

Return Value

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

Parameters

NameDescription
heightThe height of the ancestor to find.