hardfork: fix mixup in indexing variable in get_voting_info

This commit is contained in:
moneromooo-monero 2016-01-30 22:13:20 +00:00
parent 444e22f01a
commit 601ad76a5e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -373,7 +373,7 @@ bool HardFork::get_voting_info(uint8_t version, uint32_t &window, uint32_t &vote
votes = 0; votes = 0;
for (size_t n = version; n < 256; ++n) for (size_t n = version; n < 256; ++n)
votes += last_versions[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); //assert((votes >= threshold) == enabled);
earliest_height = get_earliest_ideal_height_for_version(version); earliest_height = get_earliest_ideal_height_for_version(version);
voting = heights.back().version; voting = heights.back().version;