Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <governance-validators.h>
Public Member Functions | |
CProposalValidator (const std::string &strDataHexIn=std::string(), bool fAllowLegacyFormat=true) | |
bool | Validate (bool fCheckExpiration=true) |
const std::string & | GetErrorMessages () |
Private Member Functions | |
void | ParseStrHexData (const std::string &strHexData) |
void | ParseJSONData (const std::string &strJSONData) |
bool | GetDataValue (const std::string &strKey, std::string &strValueRet) |
bool | GetDataValue (const std::string &strKey, int64_t &nValueRet) |
bool | GetDataValue (const std::string &strKey, double &dValueRet) |
bool | ValidateName () |
bool | ValidateStartEndEpoch (bool fCheckExpiration=true) |
bool | ValidatePaymentAmount () |
bool | ValidatePaymentAddress () |
bool | ValidateURL () |
bool | CheckURL (const std::string &strURLIn) |
Private Attributes | |
UniValue | objJSON |
bool | fJSONValid |
bool | fAllowLegacyFormat |
std::string | strErrorMessages |
Detailed Description
Definition at line 12 of file governance-validators.h.
Constructor & Destructor Documentation
◆ CProposalValidator()
CProposalValidator::CProposalValidator | ( | const std::string & | strDataHexIn = std::string() , |
bool | fAllowLegacyFormat = true |
||
) |
Definition at line 17 of file governance-validators.cpp.
References ParseStrHexData().
Member Function Documentation
◆ CheckURL()
|
private |
Definition at line 291 of file governance-validators.cpp.
Referenced by ValidateURL().
◆ GetDataValue() [1/3]
|
private |
Definition at line 229 of file governance-validators.cpp.
References UniValue::get_str(), objJSON, and strErrorMessages.
Referenced by ValidateName(), ValidatePaymentAddress(), ValidatePaymentAmount(), ValidateStartEndEpoch(), and ValidateURL().
◆ GetDataValue() [2/3]
|
private |
Definition at line 243 of file governance-validators.cpp.
References UniValue::get_int64(), UniValue::getType(), objJSON, strErrorMessages, and UniValue::VNUM.
◆ GetDataValue() [3/3]
|
private |
Definition at line 264 of file governance-validators.cpp.
References UniValue::get_real(), UniValue::getType(), objJSON, strErrorMessages, and UniValue::VNUM.
◆ GetErrorMessages()
|
inline |
Definition at line 25 of file governance-validators.h.
References strErrorMessages.
Referenced by gobject_check(), gobject_submit(), and CGovernanceObject::IsValidLocally().
◆ ParseJSONData()
|
private |
Definition at line 196 of file governance-validators.cpp.
References fAllowLegacyFormat, fJSONValid, UniValue::getValues(), UniValue::isObject(), objJSON, UniValue::read(), strErrorMessages, and UniValue::VOBJ.
Referenced by ParseStrHexData().
◆ ParseStrHexData()
|
private |
Definition at line 28 of file governance-validators.cpp.
References MAX_DATA_SIZE, ParseHex(), ParseJSONData(), strErrorMessages, and strprintf.
Referenced by CProposalValidator().
◆ Validate()
bool CProposalValidator::Validate | ( | bool | fCheckExpiration = true | ) |
Definition at line 38 of file governance-validators.cpp.
References fJSONValid, strErrorMessages, ValidateName(), ValidatePaymentAddress(), ValidatePaymentAmount(), ValidateStartEndEpoch(), and ValidateURL().
Referenced by gobject_check(), gobject_submit(), and CGovernanceObject::IsValidLocally().
◆ ValidateName()
|
private |
Definition at line 67 of file governance-validators.cpp.
References GetDataValue(), MAX_NAME_SIZE, strErrorMessages, and strprintf.
Referenced by Validate().
◆ ValidatePaymentAddress()
|
private |
Definition at line 141 of file governance-validators.cpp.
References DecodeDestination(), GetDataValue(), IsValidDestination(), and strErrorMessages.
Referenced by Validate().
◆ ValidatePaymentAmount()
|
private |
Definition at line 120 of file governance-validators.cpp.
References GetDataValue(), and strErrorMessages.
Referenced by Validate().
◆ ValidateStartEndEpoch()
|
private |
Definition at line 92 of file governance-validators.cpp.
References GetAdjustedTime(), GetDataValue(), and strErrorMessages.
Referenced by Validate().
◆ ValidateURL()
|
private |
Definition at line 170 of file governance-validators.cpp.
References CheckURL(), GetDataValue(), and strErrorMessages.
Referenced by Validate().
Member Data Documentation
◆ fAllowLegacyFormat
|
private |
Definition at line 17 of file governance-validators.h.
Referenced by ParseJSONData().
◆ fJSONValid
|
private |
Definition at line 16 of file governance-validators.h.
Referenced by ParseJSONData(), and Validate().
◆ objJSON
|
private |
Definition at line 15 of file governance-validators.h.
Referenced by GetDataValue(), and ParseJSONData().
◆ strErrorMessages
|
private |
Definition at line 18 of file governance-validators.h.
Referenced by GetDataValue(), GetErrorMessages(), ParseJSONData(), ParseStrHexData(), Validate(), ValidateName(), ValidatePaymentAddress(), ValidatePaymentAmount(), ValidateStartEndEpoch(), and ValidateURL().
The documentation for this class was generated from the following files:
- src/governance/governance-validators.h
- src/governance/governance-validators.cpp