From 029918ba8e214e08deb97abb45fc78ed7a58ae6e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 19 Jun 2012 12:30:02 -0700 Subject: [PATCH] Have to close ledger even when not full. --- src/NetworkOPs.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/NetworkOPs.cpp b/src/NetworkOPs.cpp index e96a0d4306..e5387e68b4 100644 --- a/src/NetworkOPs.cpp +++ b/src/NetworkOPs.cpp @@ -251,11 +251,8 @@ void NetworkOPs::setStateTimer(int sec) uint64 consensusTime = mLedgerMaster->getCurrentLedger()->getCloseTimeNC() - LEDGER_WOBBLE_TIME; uint64 now = getNetworkTimeNC(); - if ((mMode == omFULL) && !mConsensus) - { - if (now >= consensusTime) sec = 0; - else if (sec > (consensusTime - now)) sec = (consensusTime - now); - } + if (now >= consensusTime) sec = 0; + else if (sec > (consensusTime - now)) sec = (consensusTime - now); } mNetTimer.expires_from_now(boost::posix_time::seconds(sec)); mNetTimer.async_wait(boost::bind(&NetworkOPs::checkState, this, boost::asio::placeholders::error)); @@ -429,19 +426,13 @@ void NetworkOPs::checkState(const boost::system::error_code& result) // check if the ledger is bad enough to go to omTRACKING } - if (mMode != omFULL) - { - setStateTimer(4); - return; - } - int secondsToClose = theApp->getMasterLedger().getCurrentLedger()->getCloseTimeNC() - theApp->getOPs().getNetworkTimeNC(); if ((!mConsensus) && (secondsToClose < LEDGER_WOBBLE_TIME)) // pre close wobble beginConsensus(theApp->getMasterLedger().getCurrentLedger()); if (mConsensus) setStateTimer(mConsensus->timerEntry()); - else setStateTimer(10); + else setStateTimer(4); } void NetworkOPs::switchLastClosedLedger(Ledger::pointer newLedger)