[#BlockValidationState]
= BlockValidationState
:mrdocs:

Validation state specialized for block&hyphen;level results&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class BlockValidationState
    : public xref:ValidationState-04.adoc[ValidationState&lt;BlockValidationResult&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:ValidationState-04.adoc[ValidationState&lt;BlockValidationResult&gt;]`
| Template for capturing information about block&sol;transaction validation&period; This is instantiated by TxValidationState and BlockValidationState for validation information on transactions and blocks respectively&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BlockValidationState/Error.adoc[`Error`] 
| Puts the state into the run&hyphen;time error mode&period;
| xref:BlockValidationState/GetDebugMessage.adoc[`GetDebugMessage`] 
| Returns the human&hyphen;readable debug message&period;
| xref:BlockValidationState/GetRejectReason.adoc[`GetRejectReason`] 
| Returns the short rejection reason&period;
| xref:BlockValidationState/GetResult.adoc[`GetResult`] 
| Returns the recorded result code&period;
| xref:BlockValidationState/Invalid.adoc[`Invalid`] 
| Marks the state invalid and records the reason and debug message&period;
| xref:BlockValidationState/IsError.adoc[`IsError`] 
| Returns true if the state was marked with a run&hyphen;time error&period;
| xref:BlockValidationState/IsInvalid.adoc[`IsInvalid`] 
| Returns true if the state was marked invalid by a consensus or policy rule&period;
| xref:BlockValidationState/IsValid.adoc[`IsValid`] 
| Returns true if no validation failure has been recorded&period;
| xref:BlockValidationState/ToString.adoc[`ToString`] 
| Formats the state as a human&hyphen;readable string&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:TestBlockValidity.adoc[`TestBlockValidity`]
| Verify a block, including transactions&period;
|===


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