From ed7b1b402291101ef4dbc39bef2c5df79abee863 Mon Sep 17 00:00:00 2001 From: Bartek Wrona Date: Mon, 16 Dec 2024 13:09:25 +0100 Subject: [PATCH] Difference in HIVE_BLOCKCHAIN_VERSION value does not invalidates chain state --- libraries/chain/database.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/chain/database.cpp b/libraries/chain/database.cpp index d86849bee6..ab864c205c 100644 --- a/libraries/chain/database.cpp +++ b/libraries/chain/database.cpp @@ -3462,6 +3462,7 @@ void database::verify_match_of_blockchain_configuration() { 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 stored_blockchain_config = fc::json::from_string(full_stored_blockchain_config_json, fc::json::format_validation_mode::full).get_object(); const std::string current_hive_treasury_account = current_blockchain_config[HIVE_TREASURY_ACCOUNT_KEY].as_string(); @@ -3471,6 +3472,9 @@ void database::verify_match_of_blockchain_configuration() current_blockchain_config.erase(HIVE_TREASURY_ACCOUNT_KEY); stored_blockchain_config.erase(HIVE_CHAIN_ID_KEY); current_blockchain_config.erase(HIVE_CHAIN_ID_KEY); + stored_blockchain_config.erase(HIVE_BLOCKCHAIN_VERSION_KEY); + current_blockchain_config.erase(HIVE_BLOCKCHAIN_VERSION_KEY); + bool throw_exception = false; {