Stop applying patch config unl changes to hp.cfg file after patch file changes. (#213)

This commit is contained in:
Savinda Senevirathne
2021-01-07 12:12:47 +05:30
committed by GitHub
parent e8e7921ac1
commit 27b08c0c9f
3 changed files with 0 additions and 18 deletions

View File

@@ -201,20 +201,6 @@ namespace conf
ctx.log_dir = basedir + "/log";
}
int persist_unl_update(const std::set<std::string> &updated_unl)
{
contract_config cfg = {};
if (read_config(cfg) == -1)
return -1;
cfg.contract.unl = updated_unl;
if (write_config(cfg) == -1)
return -1;
return 0;
}
/**
* Reads the config file on disk and populates the in-memory 'cfg' struct.
* @return 0 for successful loading of config. -1 for failure.

View File

@@ -183,8 +183,6 @@ namespace conf
void set_contract_dir_paths(std::string exepath, std::string basedir);
int persist_unl_update(const std::set<std::string> &updated_unl);
//------Internal-use functions for this namespace.
int read_config(contract_config &cfg);

View File

@@ -104,8 +104,6 @@ namespace unl
list = conf::cfg.contract.unl;
update_json_list();
conf::persist_unl_update(list);
// Update the own node's unl status.
conf::cfg.node.is_unl = (list.find(conf::cfg.node.public_key) != list.end());
is_unl_list_changed = true;