Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
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 |
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 22 of file validation.h.
Member Enumeration Documentation
◆ mode_state
|
private |
Enumerator | |
---|---|
MODE_VALID | everything ok |
MODE_INVALID | network rule violation (DoS value may be set) |
MODE_ERROR | run-time error |
Definition at line 24 of file validation.h.
Constructor & Destructor Documentation
◆ CValidationState()
|
inline |
Definition at line 35 of file validation.h.
Member Function Documentation
◆ CorruptionPossible()
|
inline |
Definition at line 77 of file validation.h.
References corruptionPossible.
Referenced by CChainState::AcceptBlock(), CChainState::ActivateBestChainStep(), PartiallyDownloadedBlock::FillBlock(), CChainState::InvalidBlockFound(), ProcessMessage(), and while().
◆ DoS()
|
inline |
Definition at line 36 of file validation.h.
References chRejectCode, corruptionPossible, mode, MODE_ERROR, MODE_INVALID, nDoS, strDebugMessage, and strRejectReason.
Referenced by CChainState::AcceptBlockHeader(), AcceptToMemoryPoolWorker(), CDeterministicMNManager::BuildNewListFromBlock(), CalcCbTxMerkleRootMNList(), CalcCbTxMerkleRootQuorums(), CheckBlock(), CheckBlockHeader(), CheckCbTx(), CheckCbTxMerkleRoots(), CheckHashSig(), CheckInputs(), CheckInputsHash(), llmq::CheckLLMQCommitment(), CheckProRegTx(), CheckProUpRegTx(), CheckProUpRevTx(), CheckProUpServTx(), CheckService(), CheckSpecialTx(), CheckStringSig(), CheckTransaction(), Consensus::CheckTxInputs(), CChainState::ConnectBlock(), ContextualCheckBlock(), ContextualCheckBlockHeader(), ContextualCheckTransaction(), llmq::CQuorumBlockProcessor::GetCommitmentsFromBlock(), Invalid(), llmq::CQuorumBlockProcessor::ProcessBlock(), CDeterministicMNManager::ProcessBlock(), llmq::CQuorumBlockProcessor::ProcessCommitment(), ProcessSpecialTx(), ProcessSpecialTxsInBlock(), and TestBlockValidity().
◆ Error()
|
inline |
Definition at line 55 of file validation.h.
References mode, MODE_ERROR, MODE_VALID, and strRejectReason.
Referenced by CChainState::AcceptBlock(), FindUndoPos(), and FlushStateToDisk().
◆ GetDebugMessage()
|
inline |
Definition at line 82 of file validation.h.
References strDebugMessage.
Referenced by AcceptToMemoryPoolWithTime(), CheckBlock(), and FormatStateMessage().
◆ GetRejectCode()
|
inline |
Definition at line 80 of file validation.h.
References chRejectCode.
Referenced by PeerLogicValidation::BlockChecked(), CheckBlock(), FormatStateMessage(), ProcessMessage(), and sendrawtransaction().
◆ GetRejectReason()
|
inline |
Definition at line 81 of file validation.h.
References strRejectReason.
Referenced by AcceptToMemoryPoolWithTime(), BIP22ValidationResult(), PeerLogicValidation::BlockChecked(), CheckBlock(), CTransactionBuilder::Commit(), CWallet::CommitTransaction(), FormatStateMessage(), invalidateblock(), preciousblock(), ProcessMessage(), reconsiderblock(), WalletModel::sendCoins(), sendmany(), SendMoney(), and sendrawtransaction().
◆ Invalid()
|
inline |
Definition at line 50 of file validation.h.
References DoS().
Referenced by CChainState::AcceptBlockHeader(), AcceptToMemoryPoolWorker(), CheckBlock(), CheckInputs(), Consensus::CheckTxInputs(), and ContextualCheckBlockHeader().
◆ IsError()
|
inline |
Definition at line 67 of file validation.h.
References mode, and MODE_ERROR.
Referenced by BIP22ValidationResult(), and LoadExternalBlockFile().
◆ IsInvalid() [1/2]
|
inline |
Definition at line 64 of file validation.h.
References mode, and MODE_INVALID.
Referenced by CChainState::AcceptBlock(), CChainState::ActivateBestChainStep(), BIP22ValidationResult(), PeerLogicValidation::BlockChecked(), CChainState::ConnectTip(), IsInvalid(), ProcessHeadersMessage(), ProcessMessage(), sendrawtransaction(), and while().
◆ IsInvalid() [2/2]
|
inline |
Definition at line 70 of file validation.h.
References IsInvalid(), and nDoS.
◆ IsValid()
|
inline |
Definition at line 61 of file validation.h.
References mode, and MODE_VALID.
Referenced by BIP22ValidationResult(), PeerLogicValidation::BlockChecked(), invalidateblock(), LoadMempool(), preciousblock(), ReadKeyValue(), reconsiderblock(), and TestBlockValidity().
Member Data Documentation
◆ chRejectCode
|
private |
Definition at line 31 of file validation.h.
Referenced by DoS(), and GetRejectCode().
◆ corruptionPossible
|
private |
Definition at line 32 of file validation.h.
Referenced by CorruptionPossible(), and DoS().
◆ mode
|
private |
Referenced by DoS(), Error(), IsError(), IsInvalid(), and IsValid().
◆ nDoS
|
private |
Definition at line 29 of file validation.h.
Referenced by DoS(), and IsInvalid().
◆ strDebugMessage
|
private |
Definition at line 33 of file validation.h.
Referenced by DoS(), and GetDebugMessage().
◆ strRejectReason
|
private |
Definition at line 30 of file validation.h.
Referenced by DoS(), Error(), and GetRejectReason().
The documentation for this class was generated from the following file:
- src/consensus/validation.h