Holds the outcome and reason of transaction‐level validation.

Synopsis

Declared in <consensus/validation.h>

class TxValidationState
    : public ValidationState<TxValidationResult>

Base Classes

Name

Description

ValidationState<TxValidationResult>

Template for capturing information about block/transaction validation. This is instantiated by TxValidationState and BlockValidationState for validation information on transactions and blocks respectively.

Member Functions

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.

Non-Member Functions

Name

Description

ValidateInputsStandardness

Check for standard transaction types

Created with MrDocs