3#include <xrpl/basics/Log.h>
4#include <xrpl/basics/chrono.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/ledger/View.h>
7#include <xrpl/protocol/Concepts.h>
8#include <xrpl/tx/paths/BookTip.h>
9#include <xrpl/tx/paths/Offer.h>
11#include <boost/container/flat_set.hpp>
15template <StepAmount TIn, StepAmount TOut>
36 JLOG(
j_.debug()) <<
"Exceeded " <<
limit_ <<
" step limit.";
67 template <
class TTakerPays,
class TTakerGets>
128template <StepAmount TIn, StepAmount TOut>
144 [[nodiscard]] boost::container::flat_set<uint256>
const&
A generic endpoint for log messages.
Writeable view to a ledger, for applying a transaction.
Iterates and consumes raw offers in an order book.
Presents and consumes the offers in an order book.
boost::container::flat_set< uint256 > permToRemove_
void permRmOffer(uint256 const &offerIndex) override
boost::container::flat_set< uint256 > const & permToRemove() const
std::chrono::time_point< NetClock > time_point
std::uint32_t const limit_
std::uint32_t count() const
StepCounter(std::uint32_t limit, beast::Journal j)
std::optional< TOut > ownerFunds_
TOfferStreamBase(ApplyView &view, ApplyView &cancelView, Book const &book, NetClock::time_point when, StepCounter &counter, beast::Journal journal)
TOffer< TIn, TOut > & tip() const
Returns the offer at the tip of the order book.
bool shouldRmSmallIncreasedQOffer() const
NetClock::time_point const expire_
TOffer< TIn, TOut > offer_
virtual void permRmOffer(uint256 const &offerIndex)=0
virtual ~TOfferStreamBase()=default
bool step()
Advance to the next valid offer.
void erase(ApplyView &view)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.