diff options
| author | Riccardo Spagni <ric@spagni.net> | 2019-03-04 17:17:34 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2019-03-04 17:17:34 +0200 |
| commit | 9547e3f4513ca15bfbb52eb871e0a14e905d4949 (patch) | |
| tree | f4c493645a46f1a807d8fbe3c6a38491a09fc9ce /src | |
| parent | de6d6c0e29bf728109834bd963292c16358bdeba (diff) | |
| parent | 807903bbbfceab0909c48d0f962500b475726cc4 (diff) | |
| download | monzero-core-9547e3f4513ca15bfbb52eb871e0a14e905d4949.tar.gz monzero-core-9547e3f4513ca15bfbb52eb871e0a14e905d4949.tar.xz monzero-core-9547e3f4513ca15bfbb52eb871e0a14e905d4949.zip | |
Merge pull request #5224
807903bb hardfork: fix fork determination for historical heights (moneromooo)
Diffstat (limited to 'src')
| -rw-r--r-- | src/cryptonote_basic/hardfork.cpp | 2 |
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; |
