[#kernel-BlockTreeDB-LoadBlockIndexGuts]
= xref:kernel.adoc[kernel]::xref:kernel/BlockTreeDB.adoc[BlockTreeDB]::LoadBlockIndexGuts
:relfileprefix: ../../
:mrdocs:

Load every block&hyphen;index entry from the database into memory&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9516bb0f48), requires&lowbar;capability(0x7f951d7051f8), requires&lowbar;capability(0x7f9525a3b5c8), requires&lowbar;capability(0x7f951e1cd458), requires&lowbar;capability(0x7f9508635b18), requires&lowbar;capability(0x7f94f1866298)&rsqb;&rsqb;
bool
LoadBlockIndexGuts(
    xref:Consensus/Params.adoc[Consensus::Params] const& consensusParams,
    std::function&lt;CBlockIndex*(xref:uint256.adoc[uint256] const&)&gt; insertBlockIndex,
    xref:util/SignalInterrupt.adoc[util::SignalInterrupt] const& interrupt);
----

== Return Value

True on success, false if loading failed or was interrupted&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *consensusParams*
| Consensus parameters used to interpret the stored entries&period;
| *insertBlockIndex*
| Callback that inserts a block index for a given hash and returns it&period;
| *interrupt*
| Interrupt used to abort a long&hyphen;running load&period;
|===


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