ReadBlock overloads
Synopses
Declared in <node/blockstorage.h>
Read a block from disk using its block index entry.
bool
ReadBlock(
CBlock& block,
CBlockIndex const& index) const;
Functions for disk access for blocks
bool
ReadBlock(
CBlock& block,
FlatFilePos const& pos,
std::optional<uint256> const& expected_hash) const;
Return Value
-
True on success, false if the block could not be read.
-
True on success, false if the block could not be read or verified.
Parameters
Name |
Description |
block |
Output filled with the deserialized block. |
index |
The block index entry identifying the block to read. |
pos |
Position of the serialized block on disk. |
expected_hash |
Expected block hash used to verify the read, if provided. |
Created with MrDocs