3#include <xrpld/app/ledger/LedgerToJson.h>
5#include <xrpl/basics/chrono.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/ledger/Ledger.h>
8#include <xrpl/protocol/LedgerHeader.h>
9#include <xrpl/protocol/Protocol.h>
10#include <xrpl/protocol/RippleLedgerHash.h>
55 [[nodiscard]]
Seq const&
58 return ledger->header().seq;
64 [[nodiscard]]
ID const&
67 return ledger->header().hash;
73 [[nodiscard]]
ID const&
76 return ledger->header().parentHash;
85 return ledger->header().closeTimeResolution;
103 return ledger->header().closeTime;
112 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.