Refactoring hpfs, hpfs sync and hpfs serve code. (#231)

* Refactoring hpfs code to a class so it can support multiple mounts.
* Refactoring hpfs serve into a class to support mulitiple mount serving.
* Refactoring hpfs sync into class to support multiple instances.
* Code improvements in hpfs_sync.
* Taking a sync target list for hpfs syncing target set.
This commit is contained in:
Savinda Senevirathne
2021-02-02 13:17:21 +05:30
committed by GitHub
parent 08680ee8d4
commit d08d2630f6
21 changed files with 948 additions and 736 deletions

View File

@@ -14,8 +14,6 @@
#include "consensus.hpp"
#include "ledger.hpp"
#include "hpfs/hpfs.hpp"
#include "hpfs/hpfs_sync.hpp"
#include "hpfs/hpfs_serve.hpp"
#include "unl.hpp"
/**
@@ -73,8 +71,6 @@ void deinit()
p2p::deinit();
read_req::deinit();
consensus::deinit();
hpfs_sync::deinit();
hpfs_serve::deinit();
hpfs::deinit();
ledger::deinit();
conf::deinit();
@@ -200,8 +196,6 @@ int main(int argc, char **argv)
LOG_INFO << "Contract: " << conf::cfg.contract.id << " (" << conf::cfg.contract.version << ")";
if (hpfs::init() == -1 ||
hpfs_serve::init() == -1 ||
hpfs_sync::init() == -1 ||
ledger::init() == -1 ||
unl::init() == -1 ||
consensus::init() == -1 ||