PRCYCoin  2.0.0.7rc1
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 char chRejectCodeIn=0, std::string strRejectReasonIn="", bool corruptionIn=false)
 
bool Invalid (bool ret=false, unsigned char _chRejectCode=0, std::string _strRejectReason="")
 
bool Error (std::string strRejectReasonIn="")
 
bool IsValid () const
 
bool IsInvalid () const
 
bool IsError () const
 
bool IsInvalid (int &nDoSOut) const
 
bool CorruptionPossible () const
 
unsigned char GetRejectCode () const
 
std::string GetRejectReason () 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 char chRejectCode
 
bool corruptionPossible
 

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 37 of file validation.h.

Member Function Documentation

◆ CorruptionPossible()

bool CValidationState::CorruptionPossible ( ) const
inline

Definition at line 82 of file validation.h.

◆ DoS()

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

Definition at line 38 of file validation.h.

Here is the caller graph for this function:

◆ Error()

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

Definition at line 55 of file validation.h.

◆ GetRejectCode()

unsigned char CValidationState::GetRejectCode ( ) const
inline

Definition at line 86 of file validation.h.

Here is the caller graph for this function:

◆ GetRejectReason()

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

Definition at line 87 of file validation.h.

Here is the caller graph for this function:

◆ Invalid()

bool CValidationState::Invalid ( bool  ret = false,
unsigned char  _chRejectCode = 0,
std::string  _strRejectReason = "" 
)
inline

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

◆ IsInvalid() [1/2]

bool CValidationState::IsInvalid ( ) const
inline

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

Here is the call graph for this function:

◆ IsValid()

bool CValidationState::IsValid ( ) const
inline

Definition at line 62 of file validation.h.

Here is the caller graph for this function:

Member Data Documentation

◆ chRejectCode

unsigned char 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.

◆ 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: