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