Consensus reliability enhancements (#62)

* Implemented going observer mode, fixed genesis lcl retrieval issue and stage closing time.

* Fixed clearing all user output instead of consensed outputs

* Modified waiting time to improve performance.

* Fixed deadlock of waiting for insufficient peers because of recent changes.

* Removed initial waiting time for peer connections to start consensus.
This commit is contained in:
Asanka Indrajith
2019-12-06 05:08:51 -05:00
committed by GitHub
parent 7428d42aad
commit b506b34b4f
6 changed files with 85 additions and 49 deletions

View File

@@ -168,7 +168,7 @@ int main(int argc, char **argv)
hplog::init();
LOG_INFO << "Operating mode: "
<< (conf::cfg.mode == conf::OPERATING_MODE::PASSIVE ? "Passive" : "Active");
<< (conf::cfg.mode == conf::OPERATING_MODE::OBSERVING ? "Observing" : "Proposing");
if (p2p::init() != 0 || usr::init() != 0 || cons::init() != 0)
return -1;
@@ -178,9 +178,6 @@ int main(int argc, char **argv)
// After initializing primary subsystems, register the SIGINT handler.
signal(SIGINT, signal_handler);
//we are waiting for peer to estasblish peer connections.
sleep(10); //todo: replace waiting with a check to peer check.
while (true)
{
cons::consensus();