[#CheckBlock]
= CheckBlock
:mrdocs:

Context&hyphen;independent validity checks&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
CheckBlock(
    xref:CBlock.adoc[CBlock] const& block,
    xref:BlockValidationState.adoc[BlockValidationState]& state,
    xref:Consensus/Params.adoc[Consensus::Params] const& consensusParams,
    bool fCheckPOW = true,
    bool fCheckMerkleRoot = true);
----

== Return Value

true if the block passes the context&hyphen;independent checks&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *block*
| The block to check&period;
| *state*
| Validation state updated with the reason for any failure&period;
| *consensusParams*
| Consensus parameters to check the block against&period;
| *fCheckPOW*
| Whether to check the proof of work&period;
| *fCheckMerkleRoot*
| Whether to check the merkle root&period;
|===


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