[#node-BlockManager-WriteBlock]
= xref:node.adoc[node]::xref:node/BlockManager.adoc[BlockManager]::WriteBlock
:relfileprefix: ../../
:mrdocs:

Store block on disk and update block file statistics&period;

== Synopsis

Declared in `&lt;node&sol;blockstorage&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f95130c94f8), requires&lowbar;capability(0x7f950163c7e8), requires&lowbar;capability(0x7f95241d97d8), requires&lowbar;capability(0x7f951f330ad8), requires&lowbar;capability(0x7f950b9c2a98), requires&lowbar;capability(0x7f95175c51e8)&rsqb;&rsqb;
xref:FlatFilePos.adoc[FlatFilePos]
WriteBlock(
    xref:CBlock.adoc[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

[cols="1,4"]
|===
| Name| Description
| *block* [in]
| the block to be stored
| *nHeight* [in]
| the height of the block
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
