Bitcoin Core  0.19.99
P2P Digital Currency
Public Member Functions | Private Types | Private Attributes | List of all members
CValidationState Class Reference

Capture information about block/transaction validation. More...

#include <validation.h>

Public Member Functions

 CValidationState ()
 
bool Invalid (ValidationInvalidReason reasonIn, bool ret=false, const std::string &strRejectReasonIn="", const std::string &strDebugMessageIn="")
 
bool Error (const std::string &strRejectReasonIn)
 
bool IsValid () const
 
bool IsInvalid () const
 
bool IsError () const
 
ValidationInvalidReason GetReason () const
 
std::string GetRejectReason () const
 
std::string GetDebugMessage () const
 

Private Types

enum  mode_state { MODE_VALID, MODE_INVALID, MODE_ERROR }
 

Private Attributes

enum CValidationState::mode_state mode
 
ValidationInvalidReason m_reason
 
std::string strRejectReason
 
std::string strDebugMessage
 

Detailed Description

Capture information about block/transaction validation.

Definition at line 86 of file validation.h.

Member Enumeration Documentation

◆ mode_state

Enumerator
MODE_VALID 

everything ok

MODE_INVALID 

network rule violation (DoS value may be set)

MODE_ERROR 

run-time error

Definition at line 88 of file validation.h.

Constructor & Destructor Documentation

◆ CValidationState()

CValidationState::CValidationState ( )
inline

Definition at line 97 of file validation.h.

Member Function Documentation

◆ Error()

bool CValidationState::Error ( const std::string &  strRejectReasonIn)
inline

Definition at line 109 of file validation.h.

Here is the caller graph for this function:

◆ GetDebugMessage()

std::string CValidationState::GetDebugMessage ( ) const
inline

Definition at line 126 of file validation.h.

Here is the caller graph for this function:

◆ GetReason()

ValidationInvalidReason CValidationState::GetReason ( ) const
inline

Definition at line 124 of file validation.h.

Here is the caller graph for this function:

◆ GetRejectReason()

std::string CValidationState::GetRejectReason ( ) const
inline

Definition at line 125 of file validation.h.

Here is the caller graph for this function:

◆ Invalid()

bool CValidationState::Invalid ( ValidationInvalidReason  reasonIn,
bool  ret = false,
const std::string &  strRejectReasonIn = "",
const std::string &  strDebugMessageIn = "" 
)
inline

Definition at line 98 of file validation.h.

Here is the caller graph for this function:

◆ IsError()

bool CValidationState::IsError ( ) const
inline

Definition at line 121 of file validation.h.

Here is the caller graph for this function:

◆ IsInvalid()

bool CValidationState::IsInvalid ( ) const
inline

Definition at line 118 of file validation.h.

Here is the caller graph for this function:

◆ IsValid()

bool CValidationState::IsValid ( ) const
inline

Definition at line 115 of file validation.h.

Here is the caller graph for this function:

Member Data Documentation

◆ m_reason

ValidationInvalidReason CValidationState::m_reason
private

Definition at line 93 of file validation.h.

◆ mode

enum CValidationState::mode_state CValidationState::mode
private

◆ strDebugMessage

std::string CValidationState::strDebugMessage
private

Definition at line 95 of file validation.h.

◆ strRejectReason

std::string CValidationState::strRejectReason
private

Definition at line 94 of file validation.h.


The documentation for this class was generated from the following file: