Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Types | Private Attributes | List of all members
CValidationState Class Reference

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

#include <main.h>

+ Collaboration diagram for CValidationState:

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 Abort (const std::string &msg)
 
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 938 of file main.h.

Member Enumeration Documentation

Enumerator
MODE_VALID 
MODE_INVALID 
MODE_ERROR 

Definition at line 940 of file main.h.

Constructor & Destructor Documentation

CValidationState::CValidationState ( )
inline

Definition at line 950 of file main.h.

Member Function Documentation

bool CValidationState::Abort ( const std::string &  msg)
inline

Definition at line 973 of file main.h.

References AbortNode(), and Error().

Referenced by AcceptBlock(), AddToBlockIndex(), ConnectBlock(), ConnectTip(), DisconnectTip(), FindBlockPos(), FindUndoPos(), and WriteChainState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CValidationState::CorruptionPossible ( ) const
inline

Definition at line 993 of file main.h.

References corruptionPossible.

Referenced by ActivateBestChain(), and InvalidBlockFound().

+ Here is the caller graph for this function:

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

Definition at line 951 of file main.h.

References mode, MODE_ERROR, and MODE_INVALID.

Referenced by AcceptBlock(), AcceptToMemoryPool(), CheckBlock(), CheckInputs(), CheckTransaction(), ConnectBlock(), Invalid(), and ProcessBlock().

+ Here is the caller graph for this function:

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

Definition at line 967 of file main.h.

References mode, MODE_ERROR, and MODE_VALID.

Referenced by Abort(), FindBlockPos(), FindUndoPos(), and WriteChainState().

+ Here is the caller graph for this function:

unsigned char CValidationState::GetRejectCode ( ) const
inline

Definition at line 996 of file main.h.

References chRejectCode.

Referenced by InvalidBlockFound(), ProcessMessage(), and sendrawtransaction().

+ Here is the caller graph for this function:

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

Definition at line 997 of file main.h.

References strRejectReason.

Referenced by InvalidBlockFound(), ProcessMessage(), and sendrawtransaction().

+ Here is the caller graph for this function:

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

Definition at line 963 of file main.h.

References DoS().

Referenced by AcceptBlock(), AcceptToMemoryPool(), AddToBlockIndex(), CheckBlock(), CheckInputs(), and ProcessBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CValidationState::IsError ( ) const
inline

Definition at line 983 of file main.h.

References mode, and MODE_ERROR.

Referenced by LoadExternalBlockFile().

+ Here is the caller graph for this function:

bool CValidationState::IsInvalid ( ) const
inline

Definition at line 980 of file main.h.

References mode, and MODE_INVALID.

Referenced by ActivateBestChain(), ConnectTip(), InvalidBlockFound(), IsInvalid(), ProcessMessage(), and sendrawtransaction().

+ Here is the caller graph for this function:

bool CValidationState::IsInvalid ( int nDoSOut) const
inline

Definition at line 986 of file main.h.

References IsInvalid(), and nDoS.

+ Here is the call graph for this function:

bool CValidationState::IsValid ( ) const
inline

Definition at line 977 of file main.h.

References mode, and MODE_VALID.

Referenced by ReadKeyValue().

+ Here is the caller graph for this function:

Member Data Documentation

unsigned char CValidationState::chRejectCode
private

Definition at line 947 of file main.h.

Referenced by GetRejectCode().

bool CValidationState::corruptionPossible
private

Definition at line 948 of file main.h.

Referenced by CorruptionPossible().

enum CValidationState::mode_state CValidationState::mode
private

Referenced by DoS(), Error(), IsError(), IsInvalid(), and IsValid().

int CValidationState::nDoS
private

Definition at line 945 of file main.h.

Referenced by IsInvalid().

std::string CValidationState::strRejectReason
private

Definition at line 946 of file main.h.

Referenced by GetRejectReason().


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