[#Chainstate-InvalidateBlock]
= xref:Chainstate.adoc[Chainstate]::InvalidateBlock
:relfileprefix: ../
:mrdocs:

Mark a block as invalid&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9513ab4cc8), locks&lowbar;excluded(0x7f9513ab4d98), requires&lowbar;capability(0x7f9502c97d38), locks&lowbar;excluded(0x7f9502c97e08), requires&lowbar;capability(0x7f9525449a68), locks&lowbar;excluded(0x7f9525449b38), requires&lowbar;capability(0x7f95173ffd48), locks&lowbar;excluded(0x7f95173ffe18)&rsqb;&rsqb;
bool
InvalidateBlock(
    xref:BlockValidationState.adoc[BlockValidationState]& state,
    xref:CBlockIndex.adoc[CBlockIndex]* pindex);
----

== Return Value

true unless a system error occurred&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *state*
| Validation state updated with the reason for any failure&period;
| *pindex*
| Block index entry of the block to mark as invalid&period;
|===


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