Fix SN info upgrade in debug build

The v7 info doesn't need anything done, but it fails the assert() here
for a debug build.
This commit is contained in:
Jason Rhinelander 2021-04-29 13:08:54 -03:00
parent d3a35c42cc
commit 730b3c7142
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));