[#index_util-LookUpOne]
= xref:index_util.adoc[index&lowbar;util]::LookUpOne
:relfileprefix: ../
:mrdocs:

Look up a single index entry for a block, trying the height index then the hash index&period;

== Synopsis

Declared in `&lt;index&sol;db&lowbar;key&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename DBVal&gt;
static
bool
LookUpOne(
    xref:CDBWrapper.adoc[CDBWrapper] const& db,
    xref:interfaces/BlockRef.adoc[interfaces::BlockRef] const& block,
    DBVal& result);
----

== Return Value

True if an entry for the block was found&period;

== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *DBVal*
| Type of the value stored for the entry&period;
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *db*
| Database to read from&period;
| *block*
| Reference identifying the block to look up&period;
| *result*
| Set to the value that was found&period;
|===


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