[#node-BlockManager-CheckBlockDataAvailability]
= xref:node.adoc[node]::xref:node/BlockManager.adoc[BlockManager]::CheckBlockDataAvailability
:relfileprefix: ../../
:mrdocs:

Check if all blocks in the &lsqb;upper&lowbar;block, lower&lowbar;block&rsqb;range have data available as defined by the status mask&period; The caller is responsible for ensuring that lower&lowbar;block is an ancestor of upper&lowbar;block (part of the same chain)&period;

== Synopsis

Declared in `&lt;node&sol;blockstorage&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1b099718), requires&lowbar;capability(0x7f2e26d1ae78), requires&lowbar;capability(0x7f2e375e0f58), requires&lowbar;capability(0x7f2e33368318), requires&lowbar;capability(0x7f2e3542f308), requires&lowbar;capability(0x7f2e28a73e68)&rsqb;&rsqb;
bool
CheckBlockDataAvailability(
    xref:CBlockIndex.adoc[CBlockIndex] const& upper&lowbar;block,
    xref:CBlockIndex.adoc[CBlockIndex] const& lower&lowbar;block,
    xref:BlockStatus.adoc[BlockStatus] block&lowbar;status = BLOCK&lowbar;HAVE&lowbar;DATA);
----

== Return Value

True if every block in the range has the required data&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *upper&lowbar;block*
| The newest block in the range to check&period;
| *lower&lowbar;block*
| The oldest block in the range to check&semi; must be an ancestor of upper&lowbar;block&period;
| *block&lowbar;status*
| Status mask defining what counts as &quot;data available&quot;&period;
|===


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