20#include <xrpld/app/ledger/Ledger.h>
21#include <xrpld/app/ledger/LocalTxs.h>
23#include <xrpl/protocol/Indexes.h>
59 ,
m_id(txn->getTransactionID())
63 if (txn->isFieldPresent(sfLastLedgerSequence))
120 m_txns.emplace_back(index, txn);
133 for (
auto const& it :
m_txns)
134 tset.insert(it.getTX());
147 m_txns.remove_if([&view](
auto const& txn) {
148 if (txn.isExpired(view.
info().
seq))
153 AccountID const acctID = txn.getAccount();
161 SeqProxy const seqProx = txn.getSeqProxy();
164 return acctSeq > seqProx;
194 return std::make_unique<LocalTxsImp>();
Holds transactions which were deferred to the next pass of consensus.
std::shared_ptr< STTx const > m_txn
std::shared_ptr< STTx const > const & getTX() const
LocalTx(LedgerIndex index, std::shared_ptr< STTx const > const &txn)
SeqProxy getSeqProxy() const
uint256 const & getID() const
bool isExpired(LedgerIndex i) const
AccountID const & getAccount() const
void sweep(ReadView const &view) override
void push_back(LedgerIndex index, std::shared_ptr< STTx const > const &txn) override
std::list< LocalTx > m_txns
CanonicalTXSet getTxSet() override
std::size_t size() override
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
virtual LedgerInfo const & info() const =0
Returns information about the ledger.
virtual bool txExists(key_type const &key) const =0
Returns true if a tx exists in the tx map.
A type that represents either a sequence value or a ticket value.
static constexpr SeqProxy sequence(std::uint32_t v)
Factory function to return a sequence-based SeqProxy.
constexpr bool isSeq() const
constexpr std::uint32_t value() const
constexpr bool isTicket() const
Keylet account(AccountID const &id) noexcept
AccountID root.
static ticket_t const ticket
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::unique_ptr< LocalTxs > make_LocalTxs()