PIVX Core  5.6.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 DoS (int level, bool ret=false, unsigned int chRejectCodeIn=0, std::string strRejectReasonIn="", bool corruptionIn=false, const std::string &strDebugMessageIn="")
 
bool Invalid (bool ret=false, unsigned int _chRejectCode=0, const std::string &_strRejectReason="", const std::string &_strDebugMessage="")
 
bool Error (std::string strRejectReasonIn="")
 
bool IsValid () const
 
bool IsInvalid () const
 
bool IsError () const
 
bool IsInvalid (int &nDoSOut) const
 
bool CorruptionPossible () const
 
unsigned int GetRejectCode () const
 
std::string GetRejectReason () const
 
std::string GetDebugMessage () const
 
int GetDoSScore () const
 

Private Types

enum  mode_state { MODE_VALID , MODE_INVALID , MODE_ERROR }
 

Private Attributes

enum CValidationState::mode_state mode
 
int nDoS
 
std::string strRejectReason
 
unsigned int chRejectCode
 
bool corruptionPossible
 
std::string strDebugMessage
 

Detailed Description

Capture information about block/transaction validation.

Definition at line 23 of file validation.h.

Member Enumeration Documentation

◆ mode_state

Enumerator
MODE_VALID 
MODE_INVALID 

everything ok

MODE_ERROR 

network rule violation (DoS value may be set)

Definition at line 26 of file validation.h.

Constructor & Destructor Documentation

◆ CValidationState()

CValidationState::CValidationState ( )
inline

Definition at line 38 of file validation.h.

Member Function Documentation

◆ CorruptionPossible()

bool CValidationState::CorruptionPossible ( ) const
inline

Definition at line 89 of file validation.h.

◆ DoS()

bool CValidationState::DoS ( int  level,
bool  ret = false,
unsigned int  chRejectCodeIn = 0,
std::string  strRejectReasonIn = "",
bool  corruptionIn = false,
const std::string &  strDebugMessageIn = "" 
)
inline

Definition at line 39 of file validation.h.

Here is the caller graph for this function:

◆ Error()

bool CValidationState::Error ( std::string  strRejectReasonIn = "")
inline

Definition at line 62 of file validation.h.

Here is the caller graph for this function:

◆ GetDebugMessage()

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

Definition at line 95 of file validation.h.

Here is the caller graph for this function:

◆ GetDoSScore()

int CValidationState::GetDoSScore ( ) const
inline

Definition at line 96 of file validation.h.

Here is the caller graph for this function:

◆ GetRejectCode()

unsigned int CValidationState::GetRejectCode ( ) const
inline

Definition at line 93 of file validation.h.

Here is the caller graph for this function:

◆ GetRejectReason()

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

Definition at line 94 of file validation.h.

Here is the caller graph for this function:

◆ Invalid()

bool CValidationState::Invalid ( bool  ret = false,
unsigned int  _chRejectCode = 0,
const std::string &  _strRejectReason = "",
const std::string &  _strDebugMessage = "" 
)
inline

Definition at line 55 of file validation.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsError()

bool CValidationState::IsError ( ) const
inline

Definition at line 77 of file validation.h.

Here is the caller graph for this function:

◆ IsInvalid() [1/2]

bool CValidationState::IsInvalid ( ) const
inline

Definition at line 73 of file validation.h.

Here is the caller graph for this function:

◆ IsInvalid() [2/2]

bool CValidationState::IsInvalid ( int &  nDoSOut) const
inline

Definition at line 81 of file validation.h.

Here is the call graph for this function:

◆ IsValid()

bool CValidationState::IsValid ( ) const
inline

Definition at line 69 of file validation.h.

Here is the caller graph for this function:

Member Data Documentation

◆ chRejectCode

unsigned int CValidationState::chRejectCode
private

Definition at line 33 of file validation.h.

◆ corruptionPossible

bool CValidationState::corruptionPossible
private

Definition at line 34 of file validation.h.

◆ mode

enum CValidationState::mode_state CValidationState::mode
private

◆ nDoS

int CValidationState::nDoS
private

Definition at line 31 of file validation.h.

◆ strDebugMessage

std::string CValidationState::strDebugMessage
private

Definition at line 35 of file validation.h.

◆ strRejectReason

std::string CValidationState::strRejectReason
private

Definition at line 32 of file validation.h.


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