aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-11 23:35:54 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-12 13:43:12 +0000
commit2790d4d30ae5db6147c61eceaf48858d1159644d (patch)
treeee90187d3dfc18e6f71987c6ed2d12ceb1618afb /src/cryptonote_basic
parentMerge pull request #5258 (diff)
downloadmonero-2790d4d30ae5db6147c61eceaf48858d1159644d.tar.xz
hardfork: update last_versions on popped block
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/hardfork.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_basic/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp
index d1d836fcb..82b854af7 100644
--- a/src/cryptonote_basic/hardfork.cpp
+++ b/src/cryptonote_basic/hardfork.cpp
@@ -317,9 +317,12 @@ void HardFork::on_block_popped(uint64_t nblocks)
uint64_t height;
for (height = old_chain_height - 1; height >= new_chain_height; --height)
{
+ version = versions.back();
+ last_versions[version]--;
versions.pop_back();
version = db.get_hard_fork_version(height);
versions.push_front(version);
+ last_versions[version]++;
}
// does not take voting into account