mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 22:15:52 +00:00
Improve backfill in validation gate.
This commit is contained in:
@@ -549,7 +549,10 @@ void LedgerMaster::checkAccept(const uint256& hash, uint32 seq)
|
||||
|
||||
Ledger::pointer ledger = mLedgerHistory.getLedgerByHash(hash);
|
||||
if (!ledger)
|
||||
{
|
||||
theApp->getMasterLedgerAcquire().findCreate(hash, seq);
|
||||
return;
|
||||
}
|
||||
mValidLedger = ledger;
|
||||
|
||||
tryPublish();
|
||||
@@ -567,6 +570,8 @@ void LedgerMaster::tryPublish()
|
||||
}
|
||||
else if (mValidLedger->getLedgerSeq() > (mPubLedger->getLedgerSeq() + MAX_LEDGER_GAP))
|
||||
{
|
||||
cLog(lsWARNING) << "Gap in validated ledger stream " << mPubLedger->getLedgerSeq() << " - " <<
|
||||
mValidLedger->getLedgerSeq() - 1;
|
||||
mPubLedger = mValidLedger;
|
||||
mPubLedgers.push_back(mValidLedger);
|
||||
}
|
||||
@@ -605,11 +610,11 @@ void LedgerMaster::tryPublish()
|
||||
{
|
||||
if (theApp->getMasterLedgerAcquire().isFailure(hash))
|
||||
{
|
||||
cLog(lsFATAL) << "Unable to acquire a recent validated ledger";
|
||||
cLog(lsWARNING) << "Unable to acquire a recent validated ledger";
|
||||
}
|
||||
else
|
||||
{
|
||||
LedgerAcquire::pointer acq = theApp->getMasterLedgerAcquire().findCreate(hash, 0);
|
||||
LedgerAcquire::pointer acq = theApp->getMasterLedgerAcquire().findCreate(hash, seq);
|
||||
if (!acq->isDone())
|
||||
{
|
||||
acq->setAccept();
|
||||
|
||||
Reference in New Issue
Block a user