rippled
|
Represents a ledger in RCLConsensus. More...
Public Types | |
using | ID = LedgerHash |
Unique identifier of a ledger. More... | |
using | Seq = LedgerIndex |
Sequence number of a ledger. More... | |
Public Member Functions | |
RCLCxLedger ()=default | |
Default constructor. More... | |
RCLCxLedger (std::shared_ptr< Ledger const > const &l) | |
Constructor. More... | |
Seq const & | seq () const |
Sequence number of the ledger. More... | |
ID const & | id () const |
Unique identifier (hash) of this ledger. More... | |
ID const & | parentID () const |
Unique identifier (hash) of this ledger's parent. More... | |
NetClock::duration | closeTimeResolution () const |
Resolution used when calculating this ledger's close time. More... | |
bool | closeAgree () const |
Whether consensus process agreed on close time of the ledger. More... | |
NetClock::time_point | closeTime () const |
The close time of this ledger. More... | |
NetClock::time_point | parentCloseTime () const |
The close time of this ledger's parent. More... | |
Json::Value | getJson () const |
JSON representation of this ledger. More... | |
Public Attributes | |
std::shared_ptr< Ledger const > | ledger_ |
The ledger instance. More... | |
Represents a ledger in RCLConsensus.
RCLCxLedger is a thin wrapper over std::shared_ptr<Ledger const>
.
Definition at line 35 of file RCLCxLedger.h.
using ripple::RCLCxLedger::ID = LedgerHash |
Unique identifier of a ledger.
Definition at line 39 of file RCLCxLedger.h.
using ripple::RCLCxLedger::Seq = LedgerIndex |
Sequence number of a ledger.
Definition at line 41 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.
ripple::RCLCxLedger::RCLCxLedger | ( | std::shared_ptr< Ledger const > const & | l | ) |
Seq const& ripple::RCLCxLedger::seq | ( | ) | const |
Sequence number of the ledger.
Definition at line 61 of file RCLCxLedger.h.
ID const& ripple::RCLCxLedger::id | ( | ) | const |
Unique identifier (hash) of this ledger.
Definition at line 68 of file RCLCxLedger.h.
ID const& ripple::RCLCxLedger::parentID | ( | ) | const |
Unique identifier (hash) of this ledger's parent.
Definition at line 75 of file RCLCxLedger.h.
NetClock::duration ripple::RCLCxLedger::closeTimeResolution | ( | ) | const |
Resolution used when calculating this ledger's close time.
Definition at line 82 of file RCLCxLedger.h.
bool ripple::RCLCxLedger::closeAgree | ( | ) | const |
Whether consensus process agreed on close time of the ledger.
Definition at line 89 of file RCLCxLedger.h.
NetClock::time_point ripple::RCLCxLedger::closeTime | ( | ) | const |
The close time of this ledger.
Definition at line 96 of file RCLCxLedger.h.
NetClock::time_point ripple::RCLCxLedger::parentCloseTime | ( | ) | const |
The close time of this ledger's parent.
Definition at line 103 of file RCLCxLedger.h.
Json::Value ripple::RCLCxLedger::getJson | ( | ) | const |
JSON representation of this ledger.
Definition at line 110 of file RCLCxLedger.h.
std::shared_ptr<Ledger const> ripple::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 120 of file RCLCxLedger.h.