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

This sequence can have 4 types of outcomes&colon;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:node/ChainstateLoadResult.adoc[ChainstateLoadResult]
LoadChainstate(
    xref:ChainstateManager.adoc[ChainstateManager]& chainman,
    xref:kernel/CacheSizes.adoc[kernel::CacheSizes] const& cache&lowbar;sizes,
    xref:node/ChainstateLoadOptions.adoc[ChainstateLoadOptions] const& options);
----

== Description

1&period; Success 2&period; Shutdown requested

* nothing failed but a shutdown was triggered in the middle of the sequence 3&period; Soft failure
* a failure that might be recovered from with a reindex 4&period; Hard failure
* a failure that definitively cannot be recovered from with a reindex

LoadChainstate returns a (status code, error string) tuple&period;

== Return Value

A status code paired with an optional error string&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *chainman*
| The chainstate manager to load into&period;
| *cache&lowbar;sizes*
| Cache sizes to allocate to the chainstate databases&period;
| *options*
| Options controlling how the chainstate is loaded&period;
|===


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