Keep hp cfg and patch cfg consistent. (#216)

* Copy from hp cfg to patch cfg upon startup.
* Persist to hp cfg whenever patch cfg is updated.
This commit is contained in:
Ravin Perera
2021-01-10 17:48:12 +05:30
committed by GitHub
parent d39b9a56ec
commit 11cb57e9ee
8 changed files with 257 additions and 266 deletions

View File

@@ -134,7 +134,7 @@ namespace hpfs_sync
LOG_INFO << "hpfs sync: Target patch state achieved: " << new_state;
// Appling new patch file changes to hpcore runtime.
if (conf::validate_and_apply_patch_config(conf::cfg.contract, hpfs::RW_SESSION_NAME) == -1)
if (conf::apply_patch_config(hpfs::RW_SESSION_NAME) == -1)
{
LOG_ERROR << "Appling patch file changes after sync failed";
}