aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/hardfork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/hardfork.cpp')
-rw-r--r--src/cryptonote_core/hardfork.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/hardfork.cpp b/src/cryptonote_core/hardfork.cpp
index 9bd4a337c..e8ac7be98 100644
--- a/src/cryptonote_core/hardfork.cpp
+++ b/src/cryptonote_core/hardfork.cpp
@@ -210,7 +210,7 @@ bool HardFork::reorganize_from_block_height(uint64_t height)
last_versions[n] = 0;
const uint64_t rescan_height = height >= (window_size - 1) ? height - (window_size -1) : 0;
const uint8_t start_version = height == 0 ? original_version : db.get_hard_fork_version(height);
- while (heights[current_fork_index].version > start_version) {
+ while (current_fork_index > 0 && heights[current_fork_index].version > start_version) {
db.set_hard_fork_starting_height(heights[current_fork_index].version, std::numeric_limits<uint64_t>::max());
--current_fork_index;
}
@@ -375,7 +375,7 @@ bool HardFork::get_voting_info(uint8_t version, uint32_t &window, uint32_t &vote
for (size_t n = version; n < 256; ++n)
votes += last_versions[n];
threshold = (window * heights[current_version].threshold + 99) / 100;
- assert((votes >= threshold) == enabled);
+ //assert((votes >= threshold) == enabled);
earliest_height = get_earliest_ideal_height_for_version(version);
voting = heights.back().version;
return enabled;