[#kernel-BlockTreeDB-WriteBatchSync]
= xref:kernel.adoc[kernel]::xref:kernel/BlockTreeDB.adoc[BlockTreeDB]::WriteBatchSync
:relfileprefix: ../../
:mrdocs:

Atomically write block&hyphen;file info, the last&hyphen;file marker, and block&hyphen;index entries&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
WriteBatchSync(
    std::vector&lt;std::pair&lt;int, CBlockFileInfo const*&gt;&gt; const& fileInfo,
    int nLastFile,
    std::vector&lt;CBlockIndex const*&gt; const& blockinfo);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *fileInfo*
| Block&hyphen;file info entries to write, each paired with its file number&period;
| *nLastFile*
| Index of the last block file in use&period;
| *blockinfo*
| Block&hyphen;index entries to write&period;
|===


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