More bugfixes.

This commit is contained in:
JoelKatz
2013-08-11 23:50:18 -07:00
parent e4f9d972fa
commit 42bddbfcd4

View File

@@ -545,7 +545,9 @@ void LedgerMaster::advanceThread()
std::list<Ledger::pointer> pubLedgers = findNewLedgersToPublish();
if (pubLedgers.empty())
{
if (!getConfig().RUN_STANDALONE && (mValidLedger->getLedgerSeq() == mPubLedger->getLedgerSeq()))
if (!getConfig().RUN_STANDALONE && !getApp().getFeeTrack().isLoadedLocal() &&
(getApp().getJobQueue().getJobCount(jtPUBOLDLEDGER) < 3) &&
(mValidLedger->getLedgerSeq() == mPubLedger->getLedgerSeq()))
{ // We are in sync, so can acquire
uint32 missing = mCompleteLedgers.prevMissing(mPubLedger->getLedgerSeq());
if ((missing != RangeSet::absent) &&
@@ -571,6 +573,8 @@ void LedgerMaster::advanceThread()
ledger = acq->getLedger();
sl.lock();
// If things changed while we released the lock, we need another pass
if (mValidLedger->getLedgerSeq() != mPubLedger->getLedgerSeq())
progress = true;
}
@@ -608,7 +612,9 @@ void LedgerMaster::advanceThread()
mPubLedger = ledger;
progress = true;
}
getApp().getOPs().clearNeedNetworkLedger();
mPathFindNewLedger = true;
if (!mPathFindThread)
{
@@ -695,20 +701,6 @@ std::list<Ledger::pointer> LedgerMaster::findNewLedgersToPublish()
}
}
if (!ret.empty ())
{
getApp().getOPs ().clearNeedNetworkLedger ();
mPathFindNewLedger = true;
if (!mPathFindThread)
{
mPathFindThread = true;
getApp().getJobQueue ().addJob (jtUPDATE_PF, "updatePaths",
BIND_TYPE (&LedgerMaster::updatePaths, this));
}
}
return ret;
}