Returns the best known currently active chain. Its lifetime is dependent on the chainstate manager. It can be thought of as a view on a vector of block tree entries that form the best chain. The returned chain reference always points to the currently active best chain. However, state transitions within the chainstate manager (e.g., processing blocks) will update the chain's contents. Data retrieved from this chain is only consistent up to the point when new data is processed in the chainstate manager. It is the user's responsibility to guard against these inconsistencies.

Synopsis

Declared in <kernel/bitcoinkernel.h>

[[__nonnull__]]
btck_Chain const*
btck_chainstate_manager_get_active_chain(btck_ChainstateManager const* chainstate_manager);

Return Value

The chain.

Parameters

Name

Description

chainstate_manager [in]

Non‐null.

Created with MrDocs