node::BlockManager::m_snapshot_height

The height of the base block of an assumeutxo snapshot, if one is in use.

Synopsis

Declared in <node/blockstorage.h>

std::optional<int> m_snapshot_height;

Description

This controls how blockfiles are segmented by chainstate type to avoid comingling different height regions of the chain when an assumedvalid chainstate is in use. If heights are drastically different in the same blockfile, pruning suffers.

This is set during ActivateSnapshot() or upon LoadBlockIndex() if a snapshot had been previously loaded. After the snapshot is validated, this is unset to restore normal LoadBlockIndex behavior.