1#ifndef XRPL_APP_CONSENSUS_RCLCXLEDGER_H_INCLUDED
2#define XRPL_APP_CONSENSUS_RCLCXLEDGER_H_INCLUDED
4#include <xrpld/app/ledger/Ledger.h>
5#include <xrpld/app/ledger/LedgerToJson.h>
7#include <xrpl/ledger/ReadView.h>
8#include <xrpl/protocol/RippleLedgerHash.h>
58 return ledger_->info().parentHash;
65 return ledger_->info().closeTimeResolution;
79 return ledger_->info().closeTime;
86 return ledger_->info().parentCloseTime;
Represents a ledger in RCLConsensus.
NetClock::duration closeTimeResolution() const
Resolution used when calculating this ledger's close time.
Seq const & seq() const
Sequence number of the ledger.
NetClock::time_point parentCloseTime() const
The close time of this ledger's parent.
RCLCxLedger(std::shared_ptr< Ledger const > const &l)
Constructor.
ID const & id() const
Unique identifier (hash) of this ledger.
std::shared_ptr< Ledger const > ledger_
The ledger instance.
LedgerHash ID
Unique identifier of a ledger.
RCLCxLedger()=default
Default constructor.
NetClock::time_point closeTime() const
The close time of this ledger.
LedgerIndex Seq
Sequence number of a ledger.
Json::Value getJson() const
JSON representation of this ledger.
ID const & parentID() const
Unique identifier (hash) of this ledger's parent.
bool closeAgree() const
Whether consensus process agreed on close time of the ledger.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool getCloseAgree(LedgerHeader const &info)
std::uint32_t LedgerIndex
A ledger index.
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.