diff options
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h index 9c2029c9b7..8498fc2edd 100644 --- a/src/main.h +++ b/src/main.h @@ -181,6 +181,8 @@ bool ConnectBestBlock(CValidationState &state); CBlockIndex * InsertBlockIndex(uint256 hash); /** Verify a signature */ bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType); +/** Abort with a message */ +bool AbortNode(const std::string &msg); @@ -1886,9 +1888,13 @@ public: bool Invalid(bool ret = false) { return DoS(0, ret); } - bool Error(bool ret = false) { + bool Error() { mode = MODE_ERROR; - return ret; + return false; + } + bool Abort(const std::string &msg) { + AbortNode(msg); + return Error(); } bool IsValid() { return mode == MODE_VALID; |