docs: Fix three LedgerMaster comment inaccuracies

The class comment called the closed ledger "not yet fully validated"
and said the published ledger "lags" the validated one. Both can
equal the validated ledger: standalone switchLCL() validates the
closed ledger at once, and doAdvance() publishes up to and including
the validated sequence.

The ValSeq comment said the first sequence seen is kept. The code
replaces a zero, so it keeps the first nonzero sequence.

Also drop the trailing comment on newOrderBookDB(), which repeated
its @return.
This commit is contained in:
Pratik Mankawde
2026-09-25 13:13:26 +01:00
parent 81bfbb5372
commit b21958c438
2 changed files with 4 additions and 4 deletions

View File

@@ -50,9 +50,9 @@ class Transaction;
* Four ledgers are tracked, and they can all differ:
*
* current open ledger new transactions go into (owned by OpenLedger)
* closed most recently closed ledger, not yet fully validated
* closed most recently closed ledger; may already be validated
* validated highest ledger with a quorum of trusted validations
* published highest ledger handed to subscribed clients; lags validated
* published highest ledger handed to subscribed clients; can lag validated
*
* RCLConsensus ──switchLCL/consensusBuilt──> LedgerMaster
* PeerImp ──────gotFetchPack/makeFetchPack─> │
@@ -577,7 +577,7 @@ public:
* @return true if able to fulfill request.
*/
bool
newOrderBookDB(); // Returns true if able to fulfill request.
newOrderBookDB();
/**
* Corrects the cached sequence-to-hash mapping for one ledger.

View File

@@ -1153,7 +1153,7 @@ LedgerMaster::consensusBuilt(
*
* One tally per ledger hash, built while scanning the current trusted
* validations. A validation names a hash but not always a usable sequence,
* so the first sequence seen for a hash is kept and later ones ignored.
* so the first nonzero sequence seen for a hash is kept.
*
* @note Not thread-safe, and not intended to be: instances live only inside
* the loop below, which holds no lock.