Bitcoin Core  0.18.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, unsigned int chRejectCodeIn=0, 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
 
unsigned int GetRejectCode () 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
 
unsigned int chRejectCode
 
std::string strDebugMessage
 

Detailed Description

Capture information about block/transaction validation.

Definition at line 98 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 100 of file validation.h.

Constructor & Destructor Documentation

◆ CValidationState()

CValidationState::CValidationState ( )
inline

Definition at line 110 of file validation.h.

Member Function Documentation

◆ Error()

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

Definition at line 123 of file validation.h.

Here is the caller graph for this function:

◆ GetDebugMessage()

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

Definition at line 141 of file validation.h.

Here is the caller graph for this function:

◆ GetReason()

ValidationInvalidReason CValidationState::GetReason ( ) const
inline

Definition at line 138 of file validation.h.

Here is the caller graph for this function:

◆ GetRejectCode()

unsigned int CValidationState::GetRejectCode ( ) const
inline

Definition at line 139 of file validation.h.

Here is the caller graph for this function:

◆ GetRejectReason()

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

Definition at line 140 of file validation.h.

Here is the caller graph for this function:

◆ Invalid()

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

Definition at line 111 of file validation.h.

Here is the caller graph for this function:

◆ IsError()

bool CValidationState::IsError ( ) const
inline

Definition at line 135 of file validation.h.

Here is the caller graph for this function:

◆ IsInvalid()

bool CValidationState::IsInvalid ( ) const
inline

Definition at line 132 of file validation.h.

Here is the caller graph for this function:

◆ IsValid()

bool CValidationState::IsValid ( ) const
inline

Definition at line 129 of file validation.h.

Here is the caller graph for this function:

Member Data Documentation

◆ chRejectCode

unsigned int CValidationState::chRejectCode
private

Definition at line 107 of file validation.h.

◆ m_reason

ValidationInvalidReason CValidationState::m_reason
private

Definition at line 105 of file validation.h.

◆ mode

enum CValidationState::mode_state CValidationState::mode
private

◆ strDebugMessage

std::string CValidationState::strDebugMessage
private

Definition at line 108 of file validation.h.

◆ strRejectReason

std::string CValidationState::strRejectReason
private

Definition at line 106 of file validation.h.


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