[#CBlockIndex-GetAncestor-09] = xref:CBlockIndex.adoc[CBlockIndex]::GetAncestor :relfileprefix: ../ :mrdocs: Efficiently find an ancestor of this block. == Synopsis Declared in `<chain.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CBlockIndex.adoc[CBlockIndex]* GetAncestor(int height); ---- == Return Value The ancestor at the given height, or nullptr if none exists. == Parameters [cols="1,4"] |=== | Name| Description | *height* | The height of the ancestor to find. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#