Merge pull request #1452 from jagerman/debug-build-fix

Fix SN info upgrade in debug build
This commit is contained in:
Jason Rhinelander 2021-06-10 10:43:39 -03:00 committed by GitHub
commit 470bca770e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -3335,6 +3335,11 @@ namespace service_nodes
info.pulse_sorter = {};
info.version = version_t::v6_reassign_sort_keys;
}
if (info.version < version_t::v7_decommission_reason)
{
// Nothing to do here (leave consensus reasons as 0s)
info.version = version_t::v7_decommission_reason;
}
// Make sure we handled any future state version upgrades:
assert(info.version == tools::enum_top<decltype(info.version)>);
service_nodes_infos.emplace(std::move(pubkey_info.pubkey), std::move(pubkey_info.info));