Skip to content

Commit

Permalink
2.3.0-b1-debugrelay-17
Browse files Browse the repository at this point in the history
Allow gap when publishing new ledgers.
  • Loading branch information
mtrippled committed Jun 27, 2024
1 parent 633f204 commit b643687
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/xrpld/app/ledger/detail/LedgerMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1484,12 +1484,14 @@ LedgerMaster::findNewLedgersToPublish(
ss << " it's seq,pubSeq: " << ledger->info().seq
<< ',' << pubSeq << " ";
}
if (ledger && (ledger->info().seq == pubSeq))
{
ss << " yes, set it validated, add to return vector and increment pubSeq to " << pubSeq + 1 << " ";
if (ledger && (ledger->info().seq >= pubSeq)) {
ss << " yes, set " << ledger->info().seq << " validated, add to return vector";
ledger->setValidated();
ret.push_back(ledger);
++pubSeq;
if (ledger->info().seq > pubSeq)
ss << " but there's a gap";
else
ss << " increment pubSeq to " << ++pubSeq;
}
}
ss << ". ready to publish " << ret.size() << " ledgers. ";
Expand Down

0 comments on commit b643687

Please sign in to comment.