diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-05 19:12:46 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-05 19:12:48 +0200 |
commit | a0625b8085aa379ac5f7bdca6f2cbf3cbb4a5d0a (patch) | |
tree | efb535486e2d574f13049963f3a25c0757a5ebf8 /src/consensus | |
parent | c3848000277d5ab6b5f5faecb1d21b89374ef999 (diff) | |
parent | 5922b6774e352e802ca9a347cc224cfebf1a6a7d (diff) |
Merge pull request #5913
5922b67 Add assertion and cast before sending reject code (Wladimir J. van der Laan)
a651403 Add absurdly high fee message to validation state (for RPC propagation) (Shaul Kfir)
Diffstat (limited to 'src/consensus')
-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 a97d983a31..719e090a42 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -28,12 +28,12 @@ private: } mode; int nDoS; std::string strRejectReason; - unsigned char chRejectCode; + unsigned int chRejectCode; bool corruptionPossible; public: CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {} bool DoS(int level, bool ret = false, - unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="", + unsigned int chRejectCodeIn=0, std::string strRejectReasonIn="", bool corruptionIn=false) { chRejectCode = chRejectCodeIn; strRejectReason = strRejectReasonIn; @@ -45,7 +45,7 @@ public: return ret; } bool Invalid(bool ret = false, - unsigned char _chRejectCode=0, std::string _strRejectReason="") { + unsigned int _chRejectCode=0, std::string _strRejectReason="") { return DoS(0, ret, _chRejectCode, _strRejectReason); } bool Error(const std::string& strRejectReasonIn) { @@ -73,7 +73,7 @@ public: bool CorruptionPossible() const { return corruptionPossible; } - unsigned char GetRejectCode() const { return chRejectCode; } + unsigned int GetRejectCode() const { return chRejectCode; } std::string GetRejectReason() const { return strRejectReason; } }; |