mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Support for error messages and a few more rejection reasons
This commit is contained in:
@@ -950,13 +950,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() {
|
||||
return mode == MODE_VALID;
|
||||
|
||||
Reference in New Issue
Block a user