aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-30 16:45:11 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-30 16:45:26 +0100
commit19007cf5529bc35a3baf53b14c6559bda3b2b206 (patch)
tree5a4e03f7a07a2d6185c06ce941eff40ba6b29bce /src/main.h
parent2df5e3427c127f69a958be4201ce543aaaf8bcc3 (diff)
parentc117d9e93a712c3f1e2001bdb6e20e7a1c5e339b (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.h6
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;