Fixed configuration logic issues.

This commit is contained in:
ravinsp
2020-09-26 23:03:10 +05:30
parent c41e0d2e72
commit 1245da52b2
3 changed files with 20 additions and 13 deletions

View File

@@ -67,12 +67,12 @@ int parse_cmd(int argc, char **argv)
*/
void deinit()
{
usr::deinit();
p2p::deinit();
cons::deinit();
state_sync::deinit();
state_serve::deinit();
read_req::deinit();
usr::deinit();
p2p::deinit();
hpfs::deinit();
}
@@ -190,9 +190,8 @@ int main(int argc, char **argv)
<< (conf::cfg.startup_mode == conf::OPERATING_MODE::OBSERVER ? "Observer" : "Proposer");
LOG_INFO << "Public key: " << conf::cfg.pubkeyhex.substr(2); // Public key without 'ed' prefix.
if (hpfs::init() != 0 || read_req::init() != 0 ||
state_serve::init() != 0 || state_sync::init() != 0 || cons::init() != 0 ||
p2p::init() != 0 || usr::init() != 0)
if (hpfs::init() != 0 || p2p::init() != 0 || usr::init() != 0 || read_req::init() != 0 ||
state_serve::init() != 0 || state_sync::init() != 0 || cons::init() != 0)
{
deinit();
return -1;