node::BlockManager::ReadRawBlock

Read the raw, still-serialized bytes of a block (or a sub-range) from disk.

Synopsis

Declared in <node/blockstorage.h>

ReadRawBlockResult
ReadRawBlock(
    FlatFilePos const& pos,
    std::optional<std::pair<size_t, size_t>> block_part = std::nullopt) const;

Return Value

The requested bytes on success, or a ReadRawError on failure.

Parameters

NameDescription
posPosition of the serialized block on disk.
block_partOptional (offset, length) sub-range of the block to read.