mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge pull request #3592
c117d9eSupport for error messages and a few more rejection reasons (Luke Dashjr)14e7ffcUse standard BIP 22 rejection reasons where applicable (Luke Dashjr)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user