node::LoadChainstate

This sequence can have 4 types of outcomes:

Synopsis

Declared in <node/chainstate.h>

ChainstateLoadResult
LoadChainstate(
    ChainstateManager& chainman,
    kernel::CacheSizes const& cache_sizes,
    ChainstateLoadOptions const& options);

Description

1. Success 2. Shutdown requested

  • nothing failed but a shutdown was triggered in the middle of the sequence 3. Soft failure

  • a failure that might be recovered from with a reindex 4. Hard failure

  • a failure that definitively cannot be recovered from with a reindex

LoadChainstate returns a (status code, error string) tuple.

Return Value

A status code paired with an optional error string.

Parameters

NameDescription
chainmanThe chainstate manager to load into.
cache_sizesCache sizes to allocate to the chainstate databases.
optionsOptions controlling how the chainstate is loaded.