Template for capturing information about block/transaction validation. This is instantiated by TxValidationState and BlockValidationState for validation information on transactions and blocks respectively.
Declared in <consensus/validation.h>
template<typename Result>
class ValidationState;
| Name | Description |
|---|---|
Error | Puts the state into the run-time error mode. |
GetDebugMessage | Returns the human-readable debug message. |
GetRejectReason | Returns the short rejection reason. |
GetResult | Returns the recorded result code. |
Invalid | Marks the state invalid and records the reason and debug message. |
IsError | Returns true if the state was marked with a run-time error. |
IsInvalid | Returns true if the state was marked invalid by a consensus or policy rule. |
IsValid | Returns true if no validation failure has been recorded. |
ToString | Formats the state as a human-readable string. |
| Name | Description |
|---|---|
BlockValidationState | Validation state specialized for block-level results. |
PackageValidationState | Validation state for a package, carrying a PackageValidationResult rejection reason. |
TxValidationState | Holds the outcome and reason of transaction-level validation. |