Class that is used for storing validation state.
More...
ValidationState can be in 3 states:
- valid (when default initialized)
- invalid - validation failed. Example: invalid signature in transaction.
Definition at line 28 of file validation_state.hpp.
#include <validation_state.hpp>
|
std::string | toString () const |
|
void | reset () |
|
bool | Invalid (const std::string &reject_reason, const std::string &debug_message="") |
|
bool | Invalid (const std::string &reject_reason, const std::string &debug_message, size_t index) |
| Changes this ValidationState into "INVALID" mode. More...
|
|
bool | Invalid (const std::string &reject_reason, size_t index) |
|
bool | IsValid () const |
|
bool | IsInvalid () const |
|
std::string | GetDebugMessage () const |
|
std::vector< std::string > | GetPathParts () const |
|
std::string | GetPath () const |
|
◆ ValidationState()
altintegration::ValidationState::ValidationState |
( |
| ) |
|
|
inline |
◆ GetDebugMessage()
std::string altintegration::ValidationState::GetDebugMessage |
( |
| ) |
const |
|
inline |
◆ Invalid() [1/2]
bool altintegration::ValidationState::Invalid |
( |
const std::string & |
reject_reason, |
|
|
const std::string & |
debug_message, |
|
|
size_t |
index |
|
) |
| |
|
inline |
- Parameters
-
reject_reason | - supply a short, unique message that identifies this class of validation. Example: mandatory-script-verify-flag-failed |
debug_message | - supply arbitrary message that will help to debug the error. |
index | index in for loop |
- Returns
- always returns false
Definition at line 52 of file validation_state.hpp.
54 {
55 stack_trace.push_back(std::to_string(index));
56 return Invalid(reject_reason, debug_message);
57 }
◆ Invalid() [2/2]
bool altintegration::ValidationState::Invalid |
( |
const std::string & |
reject_reason, |
|
|
size_t |
index |
|
) |
| |
|
inline |
◆ IsInvalid()
bool altintegration::ValidationState::IsInvalid |
( |
| ) |
const |
|
inline |
◆ IsValid()
bool altintegration::ValidationState::IsValid |
( |
| ) |
const |
|
inline |
◆ reset()
void altintegration::ValidationState::reset |
( |
| ) |
|
|
inline |
Definition at line 34 of file validation_state.hpp.
34 {
35 stack_trace.clear();
36 m_debug_message.clear();
37 m_mode = MODE_VALID;
38 }
The documentation for this class was generated from the following file: