3#include <xrpl/basics/hardened_hash.h>
4#include <xrpl/ledger/CachedSLEs.h>
5#include <xrpl/ledger/ReadView.h>
51 return base_.header();
69 return base_.succ(key, last);
75 return base_.slesBegin();
81 return base_.slesEnd();
87 return base_.slesUpperBound(key);
93 return base_.txsBegin();
99 return base_.txsEnd();
105 return base_.txExists(key);
111 return base_.txRead(key);
121 return base_.digest(key);
CachedView(std::shared_ptr< Base const > const &base, CachedSLEs &cache)
CachedView & operator=(CachedView const &)=delete
std::shared_ptr< Ledger const > sp_
std::shared_ptr< Ledger const > const & base() const
CachedView(CachedView const &)=delete
DigestAwareReadView()=default
std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > tx_type
Rules controlling protocol behavior.
std::shared_ptr< STLedgerEntry const > const_pointer
tx_type txRead(key_type const &key) const override
Read a transaction from the tx map.
std::unique_ptr< SlesType::iter_base > slesBegin() const override
CachedViewImpl(DigestAwareReadView const *base, CachedSLEs &cache)
LedgerHeader const & header() const override
Returns information about the ledger.
CachedViewImpl(CachedViewImpl const &)=delete
SLE::const_pointer read(Keylet const &k) const override
Return the state item associated with a key.
Rules const & rules() const override
Returns the tx processing rules.
std::unique_ptr< SlesType::iter_base > slesEnd() const override
std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const override
Return the key of the next state item.
std::optional< digest_type > digest(key_type const &key) const override
Return the digest associated with the key.
bool open() const override
Returns true if this reflects an open ledger.
DigestAwareReadView const & base_
std::unordered_map< key_type, uint256, HardenedHash<> > map_
bool txExists(key_type const &key) const override
Returns true if a tx exists in the tx map.
std::unique_ptr< SlesType::iter_base > slesUpperBound(uint256 const &key) const override
Fees const & fees() const override
Returns the fees for the base ledger.
bool exists(Keylet const &k) const override
Determine if a state item exists.
CachedViewImpl & operator=(CachedViewImpl const &)=delete
std::unique_ptr< TxsType::iter_base > txsEnd() const override
std::unique_ptr< TxsType::iter_base > txsBegin() const override
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
T get(Section const §ion, std::string const &name, T const &defaultValue=T{})
Retrieve a key/value pair from a section.
TaggedCache< uint256, SLE const > CachedSLEs
Reflects the fee settings for a particular ledger.
A pair of SHAMap key and LedgerEntryType.