[#ChainstateManager-MaybeValidateSnapshot]
= xref:ChainstateManager.adoc[ChainstateManager]::MaybeValidateSnapshot
:relfileprefix: ../
:mrdocs:

Try to validate an assumeutxo snapshot by using a validated historical chainstate targeted at the snapshot block&period; When the target block is reached, the UTXO hash is computed and saved to `validated&lowbar;cs&period;m&lowbar;target&lowbar;utxohash`, and `unvalidated&lowbar;cs&period;m&lowbar;assumeutxo` will be updated from UNVALIDATED to either VALIDATED or INVALID depending on whether the hash matches&period; The INVALID case should not happen in practice because the software should refuse to load unrecognized snapshots, but if it does happen, it is a fatal error&period;

== Synopsis

Declared in `&lt;validation&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1bc16e48), requires&lowbar;capability(0x7f2e146b5198), requires&lowbar;capability(0x7f2e298fa568), requires&lowbar;capability(0x7f2e360b7cc8)&rsqb;&rsqb;
xref:SnapshotCompletionResult.adoc[SnapshotCompletionResult]
MaybeValidateSnapshot(
    xref:Chainstate.adoc[Chainstate]& validated&lowbar;cs,
    xref:Chainstate.adoc[Chainstate]& unvalidated&lowbar;cs);
----

== Return Value

The outcome of the snapshot validation attempt&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *validated&lowbar;cs*
| The fully validated chainstate targeting the snapshot block&period;
| *unvalidated&lowbar;cs*
| The snapshot chainstate whose validity is being confirmed&period;
|===


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