aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/validation.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-04-28 15:40:01 -0500
committerJohn Newbery <john@johnnewbery.com>2019-10-29 15:46:45 -0400
commit7204c6434b944f6ad51b3c895837729d3aa56eea (patch)
tree6d39e40394fbee93cdd7c70e6fa09b9d0765b20a /src/consensus/validation.h
parent1a37de4b3174d19a6d8691ae07e92b32fdfaef11 (diff)
[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.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/consensus/validation.h b/src/consensus/validation.h
index 34bdf36c5f..cdc3aecc1e 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; }
};