Skip to content

Commit

Permalink
Difference in HIVE_BLOCKCHAIN_VERSION value does not invalidates chai…
Browse files Browse the repository at this point in the history
…n state
  • Loading branch information
vogel76 committed Dec 16, 2024
1 parent 3a297f9 commit ed7b1b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;

{
Expand Down

0 comments on commit ed7b1b4

Please sign in to comment.