From 34c5a22d81eec609f281a7917ce3dbb38cc1c6ef Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 13 Jul 2012 10:15:01 -0700 Subject: [PATCH] By controlling when we create a LedgerConsensus object, we can control when we switch our view of the network's LCL. --- src/NetworkOPs.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/NetworkOPs.cpp b/src/NetworkOPs.cpp index 69a6ec49a0..0078af3d38 100644 --- a/src/NetworkOPs.cpp +++ b/src/NetworkOPs.cpp @@ -318,16 +318,8 @@ void NetworkOPs::checkState(const boost::system::error_code& result) // check if the ledger is bad enough to go to omTRACKING } -// uint32 defaultClose = theApp->getMasterLedger().getCurrentLedger()->getCloseTimeNC(); -// uint32 now = theApp->getOPs().getNetworkTimeNC(); - if (!mConsensus) - { // if now is past the ledger's default close time or there are transactions in the current ledger, close - if ((theApp->getOPs().getNetworkTimeNC() > theApp->getMasterLedger().getCurrentLedger()->getCloseTimeNC()) - || (!!theApp->getMasterLedger().getCurrentLedger()->getTransHash())) - { - beginConsensus(networkClosed, theApp->getMasterLedger().getCurrentLedger()); - } - } + if ((!mConsensus) && (mMode != omDISCONNECTED)) + beginConsensus(networkClosed, theApp->getMasterLedger().getCurrentLedger()); if (mConsensus) mConsensus->timerEntry(); setStateTimer();