node::BlockManager::WriteBlock

Store block on disk and update block file statistics.

Synopsis

Declared in <node/blockstorage.h>

[[requires_capability(0x7fb95f04d138), requires_capability(0x7fb969da6ef8), requires_capability(0x7fb96c563948), requires_capability(0x7fb9857a0a08), requires_capability(0x7fb96cb96318), requires_capability(0x7fb95a5b9868)]]
FlatFilePos
WriteBlock(
    CBlock const& block,
    int nHeight);

Return Value

in case of success, the position to which the block was written to in case of an error, an empty FlatFilePos

Parameters

NameDescription
block [in]the block to be stored
nHeight [in]the height of the block