[#CBlockIndex-GetAncestor-0f] = xref:CBlockIndex.adoc[CBlockIndex]::GetAncestor :relfileprefix: ../ :mrdocs: `GetAncestor` overloads == Synopses Declared in `<chain.h>` Efficiently find an ancestor of this block. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CBlockIndex.adoc[CBlockIndex]* xref:CBlockIndex/GetAncestor-09.adoc[GetAncestor](int height); ---- [.small]#xref:CBlockIndex/GetAncestor-09.adoc[_» more..._]# Efficiently finds an ancestor of this block. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CBlockIndex.adoc[CBlockIndex] const* xref:CBlockIndex/GetAncestor-00.adoc[GetAncestor](int height) const; ---- [.small]#xref:CBlockIndex/GetAncestor-00.adoc[_» more..._]# == 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]#