diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-30 16:45:11 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-30 16:45:26 +0100 |
commit | 19007cf5529bc35a3baf53b14c6559bda3b2b206 (patch) | |
tree | 5a4e03f7a07a2d6185c06ce941eff40ba6b29bce /src/main.h | |
parent | 2df5e3427c127f69a958be4201ce543aaaf8bcc3 (diff) | |
parent | c117d9e93a712c3f1e2001bdb6e20e7a1c5e339b (diff) |
Merge pull request #3592
c117d9e Support for error messages and a few more rejection reasons (Luke Dashjr)
14e7ffc Use standard BIP 22 rejection reasons where applicable (Luke Dashjr)
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h index ba353a885b..bbf6fce48b 100644 --- a/src/main.h +++ b/src/main.h @@ -952,13 +952,15 @@ public: unsigned char _chRejectCode=0, std::string _strRejectReason="") { return DoS(0, ret, _chRejectCode, _strRejectReason); } - bool Error() { + bool Error(std::string strRejectReasonIn="") { + if (mode == MODE_VALID) + strRejectReason = strRejectReasonIn; mode = MODE_ERROR; return false; } bool Abort(const std::string &msg) { AbortNode(msg); - return Error(); + return Error(msg); } bool IsValid() const { return mode == MODE_VALID; |