mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-26 23:19:07 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user