|
rippled
|
Wraps a ledger instance for use in generic Validations LedgerTrie. More...
#include <RCLValidations.h>

Classes | |
| struct | MakeGenesis |
Public Types | |
| using | ID = LedgerHash |
| using | Seq = LedgerIndex |
Public Member Functions | |
| RCLValidatedLedger (MakeGenesis) | |
| RCLValidatedLedger (std::shared_ptr< Ledger const > const &ledger, beast::Journal j) | |
| Seq | seq () const |
| The sequence (index) of the ledger. | |
| ID | id () const |
| The ID (hash) of the ledger. | |
| ID | operator[] (Seq const &s) const |
| Lookup the ID of the ancestor ledger. | |
| Seq | minSeq () const |
Private Attributes | |
| ID | ledgerID_ |
| Seq | ledgerSeq_ |
| std::vector< uint256 > | ancestors_ |
| beast::Journal | j_ |
Friends | |
| Seq | mismatch (RCLValidatedLedger const &a, RCLValidatedLedger const &b) |
| Find the sequence number of the earliest mismatching ancestor. | |
Wraps a ledger instance for use in generic Validations LedgerTrie.
The LedgerTrie models a ledger's history as a map from Seq -> ID. Any two ledgers that have the same ID for a given Seq have the same ID for all earlier sequences (e.g. shared ancestry). In practice, a ledger only conveniently has the prior 256 ancestor hashes available. For RCLValidatedLedger, we treat any ledgers separated by more than 256 Seq as distinct.
Definition at line 139 of file RCLValidations.h.
Definition at line 142 of file RCLValidations.h.
Definition at line 143 of file RCLValidations.h.
| ripple::RCLValidatedLedger::RCLValidatedLedger | ( | MakeGenesis | ) |
Definition at line 18 of file RCLValidations.cpp.
| ripple::RCLValidatedLedger::RCLValidatedLedger | ( | std::shared_ptr< Ledger const > const & | ledger, |
| beast::Journal | j | ||
| ) |
Definition at line 23 of file RCLValidations.cpp.
| auto ripple::RCLValidatedLedger::seq | ( | ) | const |
The sequence (index) of the ledger.
Definition at line 49 of file RCLValidations.cpp.
| auto ripple::RCLValidatedLedger::id | ( | ) | const |
The ID (hash) of the ledger.
Definition at line 54 of file RCLValidations.cpp.
| auto ripple::RCLValidatedLedger::operator[] | ( | Seq const & | s | ) | const |
Lookup the ID of the ancestor ledger.
| s | The sequence (index) of the ancestor |
Definition at line 60 of file RCLValidations.cpp.
| auto ripple::RCLValidatedLedger::minSeq | ( | ) | const |
Definition at line 43 of file RCLValidations.cpp.
|
friend |
Find the sequence number of the earliest mismatching ancestor.
Definition at line 80 of file RCLValidations.cpp.
|
private |
Definition at line 180 of file RCLValidations.h.
|
private |
Definition at line 181 of file RCLValidations.h.
|
private |
Definition at line 182 of file RCLValidations.h.
|
private |
Definition at line 183 of file RCLValidations.h.