node::BlockManager::WriteBlock

Store block on disk and update block file statistics.

Synopsis

Declared in <node/blockstorage.h>

[[requires_capability(0x7fbc8f17b288), requires_capability(0x7fbca3f047b8), requires_capability(0x7fbcace16a08), requires_capability(0x7fbca6c58678), requires_capability(0x7fbcad35fe18), requires_capability(0x7fbc9fba1bd8)]]
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