[#CCoinsView-GetHeadBlocks]
= xref:CCoinsView.adoc[CCoinsView]::GetHeadBlocks
:relfileprefix: ../
:mrdocs:

Retrieve the range of blocks that may have been only partially written&period; If the database is in a consistent state, the result is the empty vector&period; Otherwise, a two&hyphen;element vector is returned consisting of the new and the old block hash, in that order&period;

== Synopsis

Declared in `&lt;coins&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
std::vector&lt;uint256&gt;
GetHeadBlocks() const = 0;
----

== Return Value

An empty vector when consistent, otherwise the new and old block hashes&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
