Fabcoin Core  0.16.2
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, const 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 (const std::string &strRejectReasonIn)
 
bool IsValid () const
 
bool IsInvalid () const
 
bool IsError () const
 
bool IsInvalid (int &nDoSOut) const
 
bool CorruptionPossible () const
 
void SetCorruptionPossible ()
 
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
 
int nDoS
 
std::string strRejectReason
 
unsigned int chRejectCode
 
bool corruptionPossible
 
std::string strDebugMessage
 

Detailed Description

Capture information about block/transaction validation.

Definition at line 27 of file validation.h.

Member Enumeration Documentation

Enumerator
MODE_VALID 

everything ok

MODE_INVALID 

network rule violation (DoS value may be set)

MODE_ERROR 

run-time error

Definition at line 29 of file validation.h.

Constructor & Destructor Documentation

CValidationState::CValidationState ( )
inline

Definition at line 40 of file validation.h.

Member Function Documentation

bool CValidationState::CorruptionPossible ( ) const
inline

Definition at line 82 of file validation.h.

Here is the caller graph for this function:

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

Definition at line 41 of file validation.h.

Here is the caller graph for this function:

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

Definition at line 60 of file validation.h.

Here is the caller graph for this function:

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

Definition at line 90 of file validation.h.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int CValidationState::GetRejectCode ( ) const
inline

Definition at line 88 of file validation.h.

Here is the caller graph for this function:

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

Definition at line 89 of file validation.h.

Here is the caller graph for this function:

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:

bool CValidationState::IsError ( ) const
inline

Definition at line 72 of file validation.h.

Here is the caller graph for this function:

bool CValidationState::IsInvalid ( ) const
inline

Definition at line 69 of file validation.h.

Here is the caller graph for this function:

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

Definition at line 75 of file validation.h.

Here is the call graph for this function:

bool CValidationState::IsValid ( ) const
inline

Definition at line 66 of file validation.h.

Here is the caller graph for this function:

void CValidationState::SetCorruptionPossible ( )
inline

Definition at line 85 of file validation.h.

Here is the caller graph for this function:

Member Data Documentation

unsigned int CValidationState::chRejectCode
private

Definition at line 36 of file validation.h.

bool CValidationState::corruptionPossible
private

Definition at line 37 of file validation.h.

enum CValidationState::mode_state CValidationState::mode
private
int CValidationState::nDoS
private

Definition at line 34 of file validation.h.

std::string CValidationState::strDebugMessage
private

Definition at line 38 of file validation.h.

std::string CValidationState::strRejectReason
private

Definition at line 35 of file validation.h.


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