Wraps a ledger instance for use in generic Validations
LedgerTrie
.
class RCLValidatedLedger
Name |
Description |
---|---|
The ID (hash) of the ledger. |
|
Lookup the ID of the ancestor ledger. |
|
The sequence (index) of the ledger. |
Name |
Description |
---|---|
Find the sequence number of the earliest mismatching ancestor. |
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.
#include <ripple/app/consensus/RCLValidations.h>