From 601ad76a5e651638aae1c124eeb286df4db8b347 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 30 Jan 2016 22:13:20 +0000 Subject: [PATCH] hardfork: fix mixup in indexing variable in get_voting_info --- 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 463d9c06..66fb0501 100644 --- a/src/cryptonote_core/hardfork.cpp +++ b/src/cryptonote_core/hardfork.cpp @@ -373,7 +373,7 @@ bool HardFork::get_voting_info(uint8_t version, uint32_t &window, uint32_t &vote votes = 0; for (size_t n = version; n < 256; ++n) votes += last_versions[n]; - threshold = (window * heights[current_version].threshold + 99) / 100; + threshold = (window * heights[current_fork_index].threshold + 99) / 100; //assert((votes >= threshold) == enabled); earliest_height = get_earliest_ideal_height_for_version(version); voting = heights.back().version;