mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix a case where we might try too quickly to re-acquire a ledger.
This commit is contained in:
@@ -444,19 +444,26 @@ void LedgerMaster::tryPublish()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LedgerAcquire::pointer acq = theApp->getMasterLedgerAcquire().findCreate(hash);
|
if (theApp->getMasterLedgerAcquire().isFailure(hash))
|
||||||
if (!acq->isDone())
|
|
||||||
{
|
{
|
||||||
acq->setAccept();
|
cLog(lsFATAL) << "Unable to acquire a recent validated ledger";
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (acq->isComplete() && !acq->isFailed())
|
|
||||||
{
|
|
||||||
mPubLedger = acq->getLedger();
|
|
||||||
mPubLedgers.push_back(mPubLedger);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cLog(lsWARNING) << "Failed to acquire a published ledger";
|
{
|
||||||
|
LedgerAcquire::pointer acq = theApp->getMasterLedgerAcquire().findCreate(hash);
|
||||||
|
if (!acq->isDone())
|
||||||
|
{
|
||||||
|
acq->setAccept();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (acq->isComplete() && !acq->isFailed())
|
||||||
|
{
|
||||||
|
mPubLedger = acq->getLedger();
|
||||||
|
mPubLedgers.push_back(mPubLedger);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
cLog(lsWARNING) << "Failed to acquire a published ledger";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user