[#TestBlockValidity]
= TestBlockValidity
:mrdocs:

Verify a block, including transactions&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9513960bd0), requires&lowbar;capability(0x7f9501ea0000), requires&lowbar;capability(0x7f952533eba0), requires&lowbar;capability(0x7f95150c1100)&rsqb;&rsqb;
xref:BlockValidationState.adoc[BlockValidationState]
TestBlockValidity(
    xref:Chainstate.adoc[Chainstate]& chainstate,
    xref:CBlock.adoc[CBlock] const& block,
    bool check&lowbar;pow,
    bool check&lowbar;merkle&lowbar;root);
----

== Description

For signets the challenge verification is skipped when check&lowbar;pow is false&period;

== Return Value

Valid or Invalid state&period; This doesn&apos;t currently return an Error state, and shouldn&apos;t unless there is something wrong with the existing chainstate&period; (This is different from functions like AcceptBlock which can fail trying to save new data&period;)

== Parameters

[cols="1,4"]
|===
| Name| Description
| *block* [in]
| The block we want to process&period; Must connect to the current tip&period;
| *chainstate* [in]
| The chainstate to connect to&period;
| *check&lowbar;pow* [in]
| perform proof&hyphen;of&hyphen;work check, nBits in the header is always checked
| *check&lowbar;merkle&lowbar;root* [in]
| check the merkle root
|===


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