From c89e88eaa136de45e67f0e7cae64ec1ea378ea2f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 4 Oct 2015 12:37:59 +0100 Subject: [PATCH] hardfork: move an assert so it actually works An unsigned quantity is always >= 0 --- src/cryptonote_core/hardfork.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_core/hardfork.cpp b/src/cryptonote_core/hardfork.cpp index 4b40a4cf3..3a8584b7f 100644 --- a/src/cryptonote_core/hardfork.cpp +++ b/src/cryptonote_core/hardfork.cpp @@ -103,8 +103,8 @@ bool HardFork::add(uint8_t block_version, uint64_t height) while (versions.size() >= window_size) { const uint8_t old_version = versions.front(); + assert(last_versions[old_version] >= 1); last_versions[old_version]--; - assert(last_versions[old_version] >= 0); versions.pop_front(); }