aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/hardfork.cpp
diff options
context:
space:
mode:
authormoneromooo <moneromoo@nowhere.nowhere.nowhere>2019-02-27 15:56:49 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-04 11:19:59 +0000
commit807903bbbfceab0909c48d0f962500b475726cc4 (patch)
tree7594b071ca3f12190d8cbcfe8569efb70b40fde7 /src/cryptonote_basic/hardfork.cpp
parentMerge pull request #5126 (diff)
downloadmonero-807903bbbfceab0909c48d0f962500b475726cc4.tar.xz
hardfork: fix fork determination for historical heights
Diffstat (limited to '')
-rw-r--r--src/cryptonote_basic/hardfork.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_basic/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp
index 447d79aee..d1d836fcb 100644
--- a/src/cryptonote_basic/hardfork.cpp
+++ b/src/cryptonote_basic/hardfork.cpp
@@ -332,7 +332,7 @@ int HardFork::get_voted_fork_index(uint64_t height) const
{
CRITICAL_REGION_LOCAL(lock);
uint32_t accumulated_votes = 0;
- for (unsigned int n = heights.size() - 1; n > current_fork_index; --n) {
+ for (int n = heights.size() - 1; n >= 0; --n) {
uint8_t v = heights[n].version;
accumulated_votes += last_versions[v];
uint32_t threshold = (window_size * heights[n].threshold + 99) / 100;