xrpld
Loading...
Searching...
No Matches
xrpl::NoBadOffers Class Reference

Invariant: offers should be for non-negative amounts and must not be XRP to XRP. More...

#include <InvariantCheck.h>

Public Member Functions

void visitEntry (bool, SLE::const_ref, SLE::const_ref)
bool finalize (STTx const &, TER const, XRPAmount const, ReadView const &, beast::Journal const &) const

Private Attributes

bool bad_ = false

Detailed Description

Invariant: offers should be for non-negative amounts and must not be XRP to XRP.

Examine all offers modified by the transaction and ensure that there are no offers which contain negative amounts or which exchange XRP for XRP.

Definition at line 264 of file InvariantCheck.h.

Member Function Documentation

◆ visitEntry()

void xrpl::NoBadOffers::visitEntry ( bool isDelete,
SLE::const_ref before,
SLE::const_ref after )

Definition at line 236 of file InvariantCheck.cpp.

◆ finalize()

bool xrpl::NoBadOffers::finalize ( STTx const & ,
TER const ,
XRPAmount const ,
ReadView const & ,
beast::Journal const & j ) const
nodiscard

Definition at line 258 of file InvariantCheck.cpp.

Member Data Documentation

◆ bad_

bool xrpl::NoBadOffers::bad_ = false
private

Definition at line 266 of file InvariantCheck.h.