hardfork: move an assert so it actually works
An unsigned quantity is always >= 0
This commit is contained in:
parent
aac8d36422
commit
c89e88eaa1
|
@ -103,8 +103,8 @@ bool HardFork::add(uint8_t block_version, uint64_t height)
|
||||||
|
|
||||||
while (versions.size() >= window_size) {
|
while (versions.size() >= window_size) {
|
||||||
const uint8_t old_version = versions.front();
|
const uint8_t old_version = versions.front();
|
||||||
|
assert(last_versions[old_version] >= 1);
|
||||||
last_versions[old_version]--;
|
last_versions[old_version]--;
|
||||||
assert(last_versions[old_version] >= 0);
|
|
||||||
versions.pop_front();
|
versions.pop_front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue