mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Stop applying patch config unl changes to hp.cfg file after patch file changes. (#213)
This commit is contained in:
committed by
GitHub
parent
e8e7921ac1
commit
27b08c0c9f
14
src/conf.cpp
14
src/conf.cpp
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user