3#include <xrpld/app/ledger/LedgerToJson.h>
5#include <xrpl/ledger/Ledger.h>
6#include <xrpl/ledger/ReadView.h>
7#include <xrpl/protocol/RippleLedgerHash.h>
40 [[nodiscard]]
Seq const&
43 return ledger->header().seq;
47 [[nodiscard]]
ID const&
50 return ledger->header().hash;
54 [[nodiscard]]
ID const&
57 return ledger->header().parentHash;
64 return ledger->header().closeTimeResolution;
78 return ledger->header().closeTime;
85 return ledger->header().parentCloseTime;
std::chrono::time_point< NetClock > time_point
std::chrono::duration< rep, period > duration
LedgerHash ID
Unique identifier of a ledger.
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.
RCLCxLedger(std::shared_ptr< Ledger const > l)
Constructor.
RCLCxLedger()=default
Default constructor.
NetClock::time_point parentCloseTime() const
The close time of this ledger's parent.
LedgerIndex Seq
Sequence number of a ledger.
Seq const & seq() const
Sequence number of the ledger.
ID const & parentID() const
Unique identifier (hash) of this ledger's parent.
std::shared_ptr< Ledger const > ledger
The ledger instance.
ID const & id() const
Unique identifier (hash) of this ledger.
NetClock::time_point closeTime() const
The close time of this ledger.
json::Value getJson() const
JSON representation of this ledger.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint32_t LedgerIndex
A ledger index.
bool getCloseAgree(LedgerHeader const &info)
json::Value getJson(LedgerFill const &fill)
Return a new json::Value representing the ledger with given options.