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

Remove the chainstate and all on&hyphen;disk artifacts&period; Used when reindex&lcub;&hyphen;chainstate&rcub; is called during snapshot use&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard, requires&lowbar;capability(0x7f2e1bc17fd8), requires&lowbar;capability(0x7f2e146b6328), requires&lowbar;capability(0x7f2e298fb6f8), requires&lowbar;capability(0x7f2e360b8e58)&rsqb;&rsqb;
bool
DeleteChainstate(xref:Chainstate.adoc[Chainstate]& chainstate);
----

== Return Value

true if the chainstate and its artifacts were deleted successfully&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *chainstate*
| The chainstate to remove and delete from disk&period;
|===


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