3#include <xrpl/ledger/RawView.h>
4#include <xrpl/ledger/ReadView.h>
5#include <xrpl/ledger/detail/RawStateTable.h>
6#include <xrpl/protocol/STArray.h>
7#include <xrpl/protocol/XRPAmount.h>
9#include <boost/container/pmr/monotonic_buffer_resource.hpp>
10#include <boost/container/pmr/polymorphic_allocator.hpp>
75 boost::container::pmr::polymorphic_allocator<std::pair<key_type const, TxData>>>;
189 fees()
const override;
192 rules()
const override;
static constexpr size_t kInitialBufferSize
void rawDestroyXRP(XRPAmount const &fee) override
Destroy XRP.
std::size_t txCount() const
Return the number of tx inserted since creation.
tx_type txRead(key_type const &key) const override
Read a transaction from the tx map.
OpenView(OpenView &&)=default
Fees const & fees() const override
Returns the fees for the base ledger.
std::unique_ptr< TxsType::iter_base > txsEnd() const override
void rawInsert(SLE::ref sle) override
Unconditionally insert a state item.
std::size_t baseTxCount_
In batch mode, the number of transactions already executed.
std::map< key_type, TxData, std::less< key_type >, boost::container::pmr::polymorphic_allocator< std::pair< key_type const, TxData > > > txs_map
OpenView(BatchViewT, OpenView &base)
bool txExists(key_type const &key) const override
Returns true if a tx exists in the tx map.
OpenView & operator=(OpenView const &)=delete
std::shared_ptr< void const > hold_
bool open() const override
Returns true if this reflects an open ledger.
std::unique_ptr< SlesType::iter_base > slesBegin() const override
SLE::const_pointer read(Keylet const &k) const override
Return the state item associated with a key.
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::unique_ptr< SlesType::iter_base > slesUpperBound(uint256 const &key) const override
void rawErase(SLE::ref sle) override
Delete an existing state item.
OpenView & operator=(OpenView &&)=delete
void rawTxInsert(key_type const &key, std::shared_ptr< Serializer const > const &txn, std::shared_ptr< Serializer const > const &metaData) override
Add a transaction to the tx map.
LedgerHeader const & header() const override
Returns information about the ledger.
void apply(TxsRawView &to) const
Apply changes.
Rules const & rules() const override
Returns the tx processing rules.
bool exists(Keylet const &k) const override
Determine if a state item exists.
std::unique_ptr< TxsType::iter_base > txsBegin() const override
std::unique_ptr< boost::container::pmr::monotonic_buffer_resource > monotonicResource_
std::unique_ptr< SlesType::iter_base > slesEnd() const override
OpenView(OpenLedgerT, Rules const &rules, std::shared_ptr< ReadView const > const &base)
detail::RawStateTable items_
void rawReplace(SLE::ref sle) override
Unconditionally replace a state item.
std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > tx_type
Rules controlling protocol behavior.
std::shared_ptr< STLedgerEntry > const & ref
std::shared_ptr< STLedgerEntry const > const_pointer
Interface for changing ledger entries with transactions.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr struct xrpl::BatchViewT kBatchView
constexpr auto kilobytes(T value) noexcept
constexpr struct xrpl::OpenLedgerT kOpenLedger
Batch view construction tag.
constexpr BatchViewT()=default
Reflects the fee settings for a particular ledger.
A pair of SHAMap key and LedgerEntryType.
Open ledger construction tag.
constexpr OpenLedgerT()=default
std::shared_ptr< Serializer const > txn
TxData(std::shared_ptr< Serializer const > const &txn, std::shared_ptr< Serializer const > const &meta)
std::shared_ptr< Serializer const > meta