Rearchitected state sync with hpfs. (#96)

This commit is contained in:
Ravin Perera
2020-06-10 20:51:45 +05:30
committed by GitHub
parent 9ee09bebb7
commit b89dbe0a2c
32 changed files with 1383 additions and 867 deletions

View File

@@ -12,6 +12,7 @@
#include "p2p/p2p.hpp"
#include "cons/cons.hpp"
#include "hpfs/hpfs.hpp"
#include "state/state_sync.hpp"
/**
* Parses CLI args and extracts hot pocket command and parameters given.
@@ -64,10 +65,11 @@ int parse_cmd(int argc, char **argv)
*/
void deinit()
{
usr::deinit();
p2p::deinit();
cons::deinit();
sc::deinit();
state_sync::deinit();
usr::deinit();
p2p::deinit();
hpfs::deinit();
hplog::deinit();
}
@@ -188,7 +190,8 @@ int main(int argc, char **argv)
LOG_INFO << "Operating mode: "
<< (conf::cfg.startup_mode == conf::OPERATING_MODE::OBSERVER ? "Observer" : "Proposer");
if (hpfs::init() != 0 || p2p::init() != 0 || usr::init() != 0 || cons::init() != 0)
if (hpfs::init() != 0 || p2p::init() != 0 || usr::init() != 0 ||
state_sync::init() != 0 || cons::init() != 0)
{
deinit();
return -1;