ChainstateManager::MaybeValidateSnapshot

Try to validate an assumeutxo snapshot by using a validated historical chainstate targeted at the snapshot block. When the target block is reached, the UTXO hash is computed and saved to validated_cs.m_target_utxohash, and unvalidated_cs.m_assumeutxo will be updated from UNVALIDATED to either VALIDATED or INVALID depending on whether the hash matches. The INVALID case should not happen in practice because the software should refuse to load unrecognized snapshots, but if it does happen, it is a fatal error.

Synopsis

Declared in <validation.h>

[[requires_capability(0x7f2e1bc16e48), requires_capability(0x7f2e146b5198), requires_capability(0x7f2e298fa568), requires_capability(0x7f2e360b7cc8)]]
SnapshotCompletionResult
MaybeValidateSnapshot(
    Chainstate& validated_cs,
    Chainstate& unvalidated_cs);

Return Value

The outcome of the snapshot validation attempt.

Parameters

NameDescription
validated_csThe fully validated chainstate targeting the snapshot block.
unvalidated_csThe snapshot chainstate whose validity is being confirmed.