aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-03-21 14:52:01 +0200
committerRiccardo Spagni <ric@spagni.net>2019-03-21 14:52:02 +0200
commitcac4c3103a21f082e3e2ef367c85c93d752e15a2 (patch)
tree66cb9a2ee38f6d4b866ab759b6b26d5a1d54f281 /src/cryptonote_basic
parentMerge pull request #5270 (diff)
parenthardfork: update last_versions on popped block (diff)
downloadmonero-cac4c3103a21f082e3e2ef367c85c93d752e15a2.tar.xz
Merge pull request #5271
2790d4d3 hardfork: update last_versions on popped block (moneromooo-monero)
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 ebfe45f37..89bca2f09 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