diff options
| author | John Newbery <[email protected]> | 2019-04-28 15:40:01 -0500 |
|---|---|---|
| committer | John Newbery <[email protected]> | 2019-10-29 15:46:45 -0400 |
| commit | 7204c6434b944f6ad51b3c895837729d3aa56eea (patch) | |
| tree | 6d39e40394fbee93cdd7c70e6fa09b9d0765b20a /src/consensus/validation.h | |
| parent | [validation] Remove error() calls from Invalid() calls (diff) | |
| download | discoin-7204c6434b944f6ad51b3c895837729d3aa56eea.tar.xz discoin-7204c6434b944f6ad51b3c895837729d3aa56eea.zip | |
[validation] Remove useless ret parameter from Invalid()
ValidationState::Invalid() takes a parameter `ret` which is returned to
the caller. All call sites set this to false. Remove the `ret` parameter
and just return false always.
Diffstat (limited to 'src/consensus/validation.h')
| -rw-r--r-- | src/consensus/validation.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/consensus/validation.h b/src/consensus/validation.h index 34bdf36c5..cdc3aecc1 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -121,13 +121,13 @@ class TxValidationState : public ValidationState { private: TxValidationResult m_result; public: - bool Invalid(TxValidationResult result, bool ret = false, + bool Invalid(TxValidationResult result, const std::string &reject_reason="", const std::string &debug_message="") { m_result = result; ValidationState::Invalid(reject_reason, debug_message); - return ret; + return false; } TxValidationResult GetResult() const { return m_result; } }; @@ -136,12 +136,12 @@ class BlockValidationState : public ValidationState { private: BlockValidationResult m_result; public: - bool Invalid(BlockValidationResult result, bool ret = false, + bool Invalid(BlockValidationResult result, const std::string &reject_reason="", const std::string &debug_message="") { m_result = result; ValidationState::Invalid(reject_reason, debug_message); - return ret; + return false; } BlockValidationResult GetResult() const { return m_result; } }; |