3#include <xrpl/basics/CountedObject.h>
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/ledger/CachedView.h>
6#include <xrpl/ledger/View.h>
7#include <xrpl/protocol/Fees.h>
8#include <xrpl/protocol/Indexes.h>
9#include <xrpl/protocol/Rules.h>
10#include <xrpl/protocol/STLedgerEntry.h>
11#include <xrpl/protocol/Serializer.h>
12#include <xrpl/protocol/TxMeta.h>
13#include <xrpl/shamap/SHAMap.h>
244 bool correctCloseTime);
A generic endpoint for log messages.
Wraps a DigestAwareReadView to provide caching.
DigestAwareReadView()=default
void rawErase(SLE::ref sle) override
Delete an existing state item.
bool txExists(uint256 const &key) const override
std::unique_ptr< TxsType::iter_base > txsEnd() const override
bool isFlagLedger() const
Returns true if the ledger is a flag ledger.
std::optional< digest_type > digest(key_type const &key) const override
Return the digest associated with the key.
void rawTxInsert(uint256 const &key, std::shared_ptr< Serializer const > const &txn, std::shared_ptr< Serializer const > const &metaData) override
std::optional< PublicKey > validatorToDisable() const
get the to be disabled validator's master public key if any
void setLedgerInfo(LedgerHeader const &info)
void setValidated() const
void updateNegativeUNL()
update the Negative UNL ledger component.
void rawInsert(SLE::ref sle) override
Unconditionally insert a state item.
bool isVotingLedger() const
Returns true if the ledger directly precedes a flag ledger.
std::unique_ptr< SlesType::iter_base > slesBegin() const override
hash_set< PublicKey > negativeUNL() const
get Negative UNL validators' master public keys
void setImmutable(bool rehash=true)
SHAMap const & stateMap() const
SHAMap const & txMap() const
bool open() const override
Returns true if this reflects an open ledger.
static std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > deserializeTxPlusMeta(SHAMapItem const &item)
Deserialize a SHAMapItem containing STTx + STObject metadata.
LedgerHeader const & header() const override
Returns information about the ledger.
void setAccepted(NetClock::time_point closeTime, NetClock::duration closeResolution, bool correctCloseTime)
Ledger(Ledger const &)=delete
void rawReplace(SLE::ref sle) override
Unconditionally replace a state item.
static std::shared_ptr< STTx const > deserializeTx(SHAMapItem const &item)
Deserialize a SHAMapItem containing a single STTx.
Ledger & operator=(Ledger const &)=delete
void setTotalDrops(std::uint64_t totDrops)
bool addSLE(SLE const &sle)
void rawDestroyXRP(XRPAmount const &fee) override
Destroy XRP.
std::unique_ptr< TxsType::iter_base > txsBegin() const override
std::unique_ptr< SlesType::iter_base > slesEnd() const override
~Ledger() override=default
std::optional< uint256 > succ(uint256 const &key, std::optional< uint256 > const &last=std::nullopt) const override
Ledger & operator=(Ledger &&)=delete
Rules const & rules() const override
Returns the tx processing rules.
Fees const & fees() const override
Returns the fees for the base ledger.
bool walkLedger(beast::Journal j, bool parallel=false) const
std::unique_ptr< SlesType::iter_base > slesUpperBound(uint256 const &key) const override
std::optional< PublicKey > validatorToReEnable() const
get the to be re-enabled validator's master public key if any
tx_type txRead(key_type const &key) const override
Read a transaction from the tx map.
SLE::const_pointer read(Keylet const &k) const override
Return the state item associated with a key.
SLE::pointer peek(Keylet const &k) const
bool exists(Keylet const &k) const override
Determine if a state item exists.
std::chrono::time_point< NetClock > time_point
std::chrono::duration< rep, period > duration
std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > tx_type
Rules controlling protocol behavior.
A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.
std::shared_ptr< STLedgerEntry > const & ref
std::shared_ptr< STLedgerEntry > pointer
std::shared_ptr< STLedgerEntry const > const_pointer
Service registry for dependency injection.
Interface for changing ledger entries with transactions.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
CreateGenesisT const kCreateGenesis
std::unordered_set< Value, Hash, Pred, Allocator > hash_set
CachedView< Ledger > CachedLedger
A ledger wrapped in a CachedView.
Reflects the fee settings for a particular ledger.
A pair of SHAMap key and LedgerEntryType.