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