1#include <xrpl/ledger/CanonicalTXSet.h>
3#include <xrpl/basics/base_uint.h>
4#include <xrpl/beast/utility/Zero.h>
5#include <xrpl/protocol/AccountID.h>
6#include <xrpl/protocol/SField.h>
7#include <xrpl/protocol/STTx.h>
37 memcpy(ret.
begin(), account.begin(), account.size());
46 accountKey(txn->getAccountID(sfAccount)), txn->getSeqProxy(), txn->getTransactionID());
47 map_.emplace(
key, std::move(txn));
67 auto const seqProxy = tx->getSeqProxy();
68 Key const after(effectiveAccount, seqProxy, beast::kZero);
69 auto const itrNext{
map_.lower_bound(
after)};
70 if (itrNext !=
map_.end() && itrNext->first.getAccount() == effectiveAccount &&
71 (!itrNext->second->getSeqProxy().isSeq() ||
72 itrNext->second->getSeqProxy().value() == seqProxy.value() + 1))
74 result = std::move(itrNext->second);
std::map< Key, std::shared_ptr< STTx const > > map_
void insert(std::shared_ptr< STTx const > txn)
uint256 const & key() const
std::shared_ptr< STTx const > popAcctTransaction(std::shared_ptr< STTx const > const &tx)
uint256 accountKey(AccountID const &account)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool operator<(Slice const &lhs, Slice const &rhs) noexcept
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.