CValidationInterface::ChainStateFlushed

Notifies listeners of the new active block chain on-disk.

Synopsis

Declared in <validationinterface.h>

virtual
void
ChainStateFlushed(
    kernel::ChainstateRole const& role,
    CBlockLocator const& locator);

Description

Prior to this callback, any updates are not guaranteed to persist on disk (ie clients need to handle shutdown/restart safety by being able to understand when some updates were lost due to unclean shutdown).

When this callback is invoked, the validation changes done by any prior callback are guaranteed to exist on disk and survive a restart, including an unclean shutdown.

Provides a locator describing the best chain, which is likely useful for storing current state on disk in client DBs.

Called on a background thread.

Parameters

NameDescription
roleWhich chainstate (active or background) was flushed.
locatorLocator describing the best chain at flush time.