diff --git a/src/cpp/ripple/LedgerMaster.cpp b/src/cpp/ripple/LedgerMaster.cpp index 9a7ef2074..67381e195 100644 --- a/src/cpp/ripple/LedgerMaster.cpp +++ b/src/cpp/ripple/LedgerMaster.cpp @@ -248,7 +248,7 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l int timeoutCount; int fetchCount = theApp->getMasterLedgerAcquire().getFetchCount(timeoutCount); - if (fetchCount < fetchMax) + if ((fetchCount < fetchMax) && theApp->getOPs().isFull()) { if (timeoutCount > 2) { @@ -305,7 +305,7 @@ bool LedgerMaster::shouldAcquire(uint32 currentLedger, uint32 ledgerHistory, uin void LedgerMaster::resumeAcquiring() { - if (theApp->getOPs().isNeedNetworkLedger()) + if (!theApp->getOPs().isFull()) return; boost::recursive_mutex::scoped_lock ml(mLock); diff --git a/src/cpp/ripple/NetworkOPs.h b/src/cpp/ripple/NetworkOPs.h index 9cde74eb5..ee656a061 100644 --- a/src/cpp/ripple/NetworkOPs.h +++ b/src/cpp/ripple/NetworkOPs.h @@ -273,6 +273,7 @@ public: void needNetworkLedger() { mNeedNetworkLedger = true; } void clearNeedNetworkLedger() { mNeedNetworkLedger = false; } bool isNeedNetworkLedger() { return mNeedNetworkLedger; } + bool isFull() { return !mNeedNetworkLedger && (mMode == omFULL); } void setProposing(bool p, bool v) { mProposing = p; mValidating = v; } bool isProposing() { return mProposing; } bool isValidating() { return mValidating; }