btck_block_read

Reads the block the passed in block tree entry points to from disk and returns it.

Synopsis

Declared in <kernel/bitcoinkernel.h>

[[nodiscard, __nonnull__]]
btck_Block*
btck_block_read(
    btck_ChainstateManager const* chainstate_manager,
    btck_BlockTreeEntry const* block_tree_entry);

Return Value

The read out block, or null on error.

NOTE

The return value should not be discarded.

Parameters

NameDescription
chainstate_manager [in]Non-null.
block_tree_entry [in]Non-null.