From 5c7a9f728cb5454f16849900b50598a404e04cde Mon Sep 17 00:00:00 2001 From: Bartek Wrona Date: Mon, 16 Dec 2024 16:34:29 +0100 Subject: [PATCH] Copy of state comparison code specific to snapshot load supplemented by HIVE_BLOCKCHAIN_VERSION ignoring --- libraries/plugins/state_snapshot/state_snapshot_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/plugins/state_snapshot/state_snapshot_plugin.cpp b/libraries/plugins/state_snapshot/state_snapshot_plugin.cpp index 2afc3f85a0..bc16c3313a 100644 --- a/libraries/plugins/state_snapshot/state_snapshot_plugin.cpp +++ b/libraries/plugins/state_snapshot/state_snapshot_plugin.cpp @@ -1604,6 +1604,7 @@ void state_snapshot_plugin::impl::load_snapshot_impl(const std::string& snapshot { constexpr char HIVE_TREASURY_ACCOUNT_KEY[] = "HIVE_TREASURY_ACCOUNT"; constexpr char HIVE_CHAIN_ID_KEY[] = "HIVE_CHAIN_ID"; + constexpr char HIVE_BLOCKCHAIN_VERSION_KEY[] = "HIVE_BLOCKCHAIN_VERSION"; fc::mutable_variant_object loaded_blockchain_config = fc::json::from_string(full_loaded_blockchain_configuration_json, fc::json::format_validation_mode::full).get_object(); const std::string loaded_hive_treasury_account = loaded_blockchain_config[HIVE_TREASURY_ACCOUNT_KEY].as_string(); @@ -1613,6 +1614,9 @@ void state_snapshot_plugin::impl::load_snapshot_impl(const std::string& snapshot current_blockchain_config.erase(HIVE_TREASURY_ACCOUNT_KEY); loaded_blockchain_config.erase(HIVE_CHAIN_ID_KEY); current_blockchain_config.erase(HIVE_CHAIN_ID_KEY); + loaded_blockchain_config.erase(HIVE_BLOCKCHAIN_VERSION_KEY); + current_blockchain_config.erase(HIVE_BLOCKCHAIN_VERSION_KEY); + bool throw_exception = false; {