[#CreateUTXOSnapshot]
= CreateUTXOSnapshot
:mrdocs:

Helper to create UTXO snapshots given a chainstate and a file handle&period;

== Synopsis

Declared in `&lt;rpc&sol;blockchain&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:UniValue.adoc[UniValue]
CreateUTXOSnapshot(
    xref:node/NodeContext.adoc[node::NodeContext]& node,
    xref:Chainstate.adoc[Chainstate]& chainstate,
    xref:AutoFile.adoc[AutoFile]&& afile,
    xref:fs/path.adoc[fs::path] const& path,
    xref:fs/path.adoc[fs::path] const& tmppath);
----

== Return Value

a UniValue map containing metadata about the snapshot&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *node*
| The node context&period;
| *chainstate*
| The chainstate to snapshot&period;
| *afile*
| The output file to write the snapshot to&period;
| *path*
| The final path for the snapshot file&period;
| *tmppath*
| The temporary path written to before renaming to `path&period;`
|===


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