[#BaseIndex-DB-WriteBestBlock]
= xref:BaseIndex.adoc[BaseIndex]::xref:BaseIndex/DB.adoc[DB]::WriteBestBlock
:relfileprefix: ../../
:mrdocs:

Write block locator of the chain that the index is in sync with&period;

== Synopsis

Declared in `&lt;index&sol;base&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
void
WriteBestBlock(
    xref:CDBBatch.adoc[CDBBatch]& batch,
    xref:CBlockLocator.adoc[CBlockLocator] const& locator);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *batch*
| Write batch that the update is added to&period;
| *locator*
| Block locator marking the chain the index is synced to&period;
|===


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