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
|
||||
{
|
||||
LedgerAcquire::pointer acq = theApp->getMasterLedgerAcquire().findCreate(hash);
|
||||
if (!acq->isDone())
|
||||
if (theApp->getMasterLedgerAcquire().isFailure(hash))
|
||||
{
|
||||
acq->setAccept();
|
||||
break;
|
||||
}
|
||||
else if (acq->isComplete() && !acq->isFailed())
|
||||
{
|
||||
mPubLedger = acq->getLedger();
|
||||
mPubLedgers.push_back(mPubLedger);
|
||||
cLog(lsFATAL) << "Unable to acquire a recent validated ledger";
|
||||
}
|
||||
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