mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 15:35:50 +00:00
Cleanups.
This commit is contained in:
@@ -1832,11 +1832,14 @@ bool Ledger::pendSaveValidated (bool isSynchronous, bool isCurrent)
|
||||
{
|
||||
saveValidatedLedger(isCurrent);
|
||||
}
|
||||
else if (isCurrent)
|
||||
{
|
||||
getApp().getJobQueue ().addJob (jtPUBLEDGER, "Ledger::pendSave",
|
||||
BIND_TYPE (&Ledger::saveValidatedLedgerAsync, shared_from_this (), P_1, isCurrent));
|
||||
}
|
||||
else
|
||||
{
|
||||
getApp().getJobQueue ().addJob (
|
||||
isCurrent ? jtPUBLEDGER : jtPUBOLDLEDGER,
|
||||
isCurrent ? "Ledger::pendSave" : "Ledger::pendOldSave",
|
||||
getApp().getJobQueue ().addLimitJob (jtPUBOLDLEDGER, "Ledger::pendOldSave", 2,
|
||||
BIND_TYPE (&Ledger::saveValidatedLedgerAsync, shared_from_this (), P_1, isCurrent));
|
||||
}
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ void LedgerMaster::advanceThread()
|
||||
if (pubLedgers.empty())
|
||||
{
|
||||
if (!getConfig().RUN_STANDALONE && !getApp().getFeeTrack().isLoadedLocal() &&
|
||||
(getApp().getJobQueue().getJobCount(jtPUBOLDLEDGER) < 3) &&
|
||||
(getApp().getJobQueue().getJobCount(jtPUBOLDLEDGER) < 10) &&
|
||||
(mValidLedger->getLedgerSeq() == mPubLedger->getLedgerSeq()))
|
||||
{ // We are in sync, so can acquire
|
||||
uint32 missing = mCompleteLedgers.prevMissing(mPubLedger->getLedgerSeq());
|
||||
@@ -570,7 +570,11 @@ void LedgerMaster::advanceThread()
|
||||
getApp().getInboundLedgers().findCreate(nextLedger->getParentHash(),
|
||||
nextLedger->getLedgerSeq() - 1);
|
||||
if (acq && acq->isComplete() && !acq->isFailed())
|
||||
{
|
||||
ledger = acq->getLedger();
|
||||
getApp().getInboundLedgers().findCreate(ledger->getParentHash(),
|
||||
ledger->getLedgerSeq() - 1);
|
||||
}
|
||||
|
||||
sl.lock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user