mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Stop the acquire engine in cases where it shouldn't run.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user