Auto merge of #1051 - ThisIsNotOfficialCodeItsJustForks:t863-mock-coverage-of-checktransaction, r=ebfull

Add mock test coverage of CheckTransaction

Closes #863.
This commit is contained in:
zkbot
2016-07-14 18:43:07 +00:00
6 changed files with 328 additions and 34 deletions

View File

@@ -30,9 +30,8 @@ private:
std::string strRejectReason;
unsigned char chRejectCode;
bool corruptionPossible;
bool pourVerify;
public:
CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false), pourVerify(true) {}
CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {}
virtual bool DoS(int level, bool ret = false,
unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="",
bool corruptionIn=false) {
@@ -45,12 +44,6 @@ public:
mode = MODE_INVALID;
return ret;
}
virtual bool SetPerformPourVerification(bool pourVerifyIn) {
pourVerify = pourVerifyIn;
}
virtual bool PerformPourVerification() {
return pourVerify;
}
virtual bool Invalid(bool ret = false,
unsigned char _chRejectCode=0, std::string _strRejectReason="") {
return DoS(0, ret, _chRejectCode, _strRejectReason);