mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Fix comparison tool by asking for blocks more aggressively
This commit is contained in:
@@ -946,13 +946,15 @@ private:
|
||||
MODE_ERROR, // run-time error
|
||||
} mode;
|
||||
int nDoS;
|
||||
bool corruptionPossible;
|
||||
public:
|
||||
CValidationState() : mode(MODE_VALID), nDoS(0) {}
|
||||
bool DoS(int level, bool ret = false) {
|
||||
bool DoS(int level, bool ret = false, bool corruptionIn = false) {
|
||||
if (mode == MODE_ERROR)
|
||||
return ret;
|
||||
nDoS += level;
|
||||
mode = MODE_INVALID;
|
||||
corruptionPossible = corruptionIn;
|
||||
return ret;
|
||||
}
|
||||
bool Invalid(bool ret = false) {
|
||||
@@ -982,6 +984,9 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool CorruptionPossible() {
|
||||
return corruptionPossible;
|
||||
}
|
||||
};
|
||||
|
||||
/** An in-memory indexed chain of blocks. */
|
||||
|
||||
Reference in New Issue
Block a user