mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
hardfork: update last_versions on popped block
This commit is contained in:
parent
1d1a02e9f9
commit
2790d4d30a
1 changed files with 3 additions and 0 deletions
|
@ -317,9 +317,12 @@ void HardFork::on_block_popped(uint64_t nblocks)
|
||||||
uint64_t height;
|
uint64_t height;
|
||||||
for (height = old_chain_height - 1; height >= new_chain_height; --height)
|
for (height = old_chain_height - 1; height >= new_chain_height; --height)
|
||||||
{
|
{
|
||||||
|
version = versions.back();
|
||||||
|
last_versions[version]--;
|
||||||
versions.pop_back();
|
versions.pop_back();
|
||||||
version = db.get_hard_fork_version(height);
|
version = db.get_hard_fork_version(height);
|
||||||
versions.push_front(version);
|
versions.push_front(version);
|
||||||
|
last_versions[version]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// does not take voting into account
|
// does not take voting into account
|
||||||
|
|
Loading…
Reference in a new issue