|
xrpld
|
Represents a ledger in RCLConsensus. More...
#include <RCLCxLedger.h>

Public Types | |
| using | ID = LedgerHash |
| Unique identifier of a ledger. | |
| using | Seq = LedgerIndex |
| Sequence number of a ledger. | |
Public Member Functions | |
| RCLCxLedger ()=default | |
| Default constructor. | |
| RCLCxLedger (std::shared_ptr< Ledger const > l) | |
| Constructor. | |
| Seq const & | seq () const |
| Sequence number of the ledger. | |
| ID const & | id () const |
| Unique identifier (hash) of this ledger. | |
| ID const & | parentID () const |
| Unique identifier (hash) of this ledger's parent. | |
| NetClock::duration | closeTimeResolution () const |
| Resolution used when calculating this ledger's close time. | |
| bool | closeAgree () const |
| Whether consensus process agreed on close time of the ledger. | |
| NetClock::time_point | closeTime () const |
| The close time of this ledger. | |
| NetClock::time_point | parentCloseTime () const |
| The close time of this ledger's parent. | |
| json::Value | getJson () const |
| JSON representation of this ledger. | |
Public Attributes | |
| std::shared_ptr< Ledger const > | ledger |
| The ledger instance. | |
Represents a ledger in RCLConsensus.
RCLCxLedger is a thin wrapper over std::shared_ptr<Ledger const>.
Definition at line 15 of file RCLCxLedger.h.
| using xrpl::RCLCxLedger::ID = LedgerHash |
Unique identifier of a ledger.
Definition at line 19 of file RCLCxLedger.h.
| using xrpl::RCLCxLedger::Seq = LedgerIndex |
Sequence number of a ledger.
Definition at line 21 of file RCLCxLedger.h.
|
default |
Default constructor.
TODO: This may not be needed if we ensure RCLConsensus is handed a valid ledger in its constructor. Its bad now because other members are not checking whether the ledger is valid.
| xrpl::RCLCxLedger::RCLCxLedger | ( | std::shared_ptr< Ledger const > | l | ) |
|
nodiscard |
Sequence number of the ledger.
Definition at line 41 of file RCLCxLedger.h.
|
nodiscard |
Unique identifier (hash) of this ledger.
Definition at line 48 of file RCLCxLedger.h.
|
nodiscard |
Unique identifier (hash) of this ledger's parent.
Definition at line 55 of file RCLCxLedger.h.
|
nodiscard |
Resolution used when calculating this ledger's close time.
Definition at line 62 of file RCLCxLedger.h.
|
nodiscard |
Whether consensus process agreed on close time of the ledger.
Definition at line 69 of file RCLCxLedger.h.
|
nodiscard |
The close time of this ledger.
Definition at line 76 of file RCLCxLedger.h.
|
nodiscard |
The close time of this ledger's parent.
Definition at line 83 of file RCLCxLedger.h.
|
nodiscard |
JSON representation of this ledger.
Definition at line 90 of file RCLCxLedger.h.
| std::shared_ptr<Ledger const> xrpl::RCLCxLedger::ledger |
The ledger instance.
TODO: Make this shared_ptr<ReadView const> .. requires ability to create a new ledger from a readView?
Definition at line 100 of file RCLCxLedger.h.