diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-01-30 16:45:11 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-01-30 16:45:26 +0100 |
| commit | 19007cf5529bc35a3baf53b14c6559bda3b2b206 (patch) | |
| tree | 5a4e03f7a07a2d6185c06ce941eff40ba6b29bce /src/main.h | |
| parent | Fix build time when building from tarball (now really) (diff) | |
| parent | Support for error messages and a few more rejection reasons (diff) | |
| download | discoin-19007cf5529bc35a3baf53b14c6559bda3b2b206.tar.xz discoin-19007cf5529bc35a3baf53b14c6559bda3b2b206.zip | |
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 ba353a885..bbf6fce48 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; |