xrpld
Loading...
Searching...
No Matches
xrpl::MPTEndpointPaymentStep Class Reference
Inheritance diagram for xrpl::MPTEndpointPaymentStep:
Collaboration diagram for xrpl::MPTEndpointPaymentStep:

Public Member Functions

 MPTEndpointPaymentStep (StrandContext const &ctx, AccountID const &src, AccountID const &dst, MPTID const &mpt)
TER check (StrandContext const &ctx, SLE::const_ref sleSrc) const
std::string logString () const override
AccountID const & src () const
AccountID const & dst () const
MPTID const & mptID () const
std::optional< EitherAmountcachedIn () const override
std::optional< EitherAmountcachedOut () const override
std::optional< AccountIDdirectStepSrcAcct () const override
std::optional< std::pair< AccountID, AccountID > > directStepAccts () const override
DebtDirection debtDirection (ReadView const &sb, StrandDirection dir) const override
std::uint32_t lineQualityIn (ReadView const &v) const override
std::pair< std::optional< Quality >, DebtDirectionqualityUpperBound (ReadView const &v, DebtDirection dir) const override
std::pair< MPTAmount, MPTAmountrevImp (PaymentSandbox &sb, ApplyView &afView, boost::container::flat_set< uint256 > &ofrsToRm, MPTAmount const &out)
std::pair< MPTAmount, MPTAmountfwdImp (PaymentSandbox &sb, ApplyView &afView, boost::container::flat_set< uint256 > &ofrsToRm, MPTAmount const &in)
std::pair< bool, EitherAmountvalidFwd (PaymentSandbox &sb, ApplyView &afView, EitherAmount const &in) override
TER check (StrandContext const &ctx) const
void setCacheLimiting (MPTAmount const &fwdIn, MPTAmount const &fwdSrcToDst, MPTAmount const &fwdOut, DebtDirection srcDebtDir)

Static Public Member Functions

static bool verifyPrevStepDebtDirection (DebtDirection)
static TER checkCreateMPT (ApplyView &, DebtDirection)

Protected Member Functions

std::pair< MPTAmount, DebtDirectionmaxPaymentFlow (ReadView const &sb) const
std::pair< std::uint32_t, std::uint32_tqualitiesSrcRedeems (ReadView const &sb) const
std::pair< std::uint32_t, std::uint32_tqualitiesSrcIssues (ReadView const &sb, DebtDirection prevStepDebtDirection) const
std::pair< std::uint32_t, std::uint32_tqualities (ReadView const &sb, DebtDirection srcDebtDir, StrandDirection strandDir) const
void resetCache (DebtDirection dir)
std::string logStringImpl (char const *name) const

Protected Attributes

AccountID const src_
AccountID const dst_
MPTIssue const mptIssue_
Step const *const prevStep_
bool const isLast_
bool const isDirectBetweenHolders_
beast::Journal const j_
std::optional< Cache > cache_

Private Member Functions

bool equal (Step const &rhs) const override

Private Attributes

friend TDerived

Detailed Description

Definition at line 242 of file MPTEndpointStep.cpp.

Constructor & Destructor Documentation

◆ MPTEndpointPaymentStep()

xrpl::MPTEndpointPaymentStep::MPTEndpointPaymentStep ( StrandContext const & ctx,
AccountID const & src,
AccountID const & dst,
MPTID const & mpt )

Definition at line 248 of file MPTEndpointStep.cpp.

Member Function Documentation

◆ verifyPrevStepDebtDirection()

bool xrpl::MPTEndpointPaymentStep::verifyPrevStepDebtDirection ( DebtDirection )
static

Definition at line 258 of file MPTEndpointStep.cpp.

◆ check() [1/2]

TER xrpl::MPTEndpointPaymentStep::check ( StrandContext const & ctx,
SLE::const_ref sleSrc ) const
nodiscard

Definition at line 331 of file MPTEndpointStep.cpp.

◆ logString()

std::string xrpl::MPTEndpointPaymentStep::logString ( ) const
nodiscardoverride

Definition at line 270 of file MPTEndpointStep.cpp.

◆ checkCreateMPT()

TER xrpl::MPTEndpointPaymentStep::checkCreateMPT ( ApplyView & ,
DebtDirection  )
static

Definition at line 277 of file MPTEndpointStep.cpp.

◆ maxPaymentFlow()

std::pair< MPTAmount, DebtDirection > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::maxPaymentFlow ( ReadView const & sb) const
nodiscardprotectedinherited

Definition at line 75 of file MPTEndpointStep.cpp.

◆ qualitiesSrcRedeems()

std::pair< std::uint32_t, std::uint32_t > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::qualitiesSrcRedeems ( ReadView const & sb) const
nodiscardprotectedinherited

Definition at line 79 of file MPTEndpointStep.cpp.

◆ qualitiesSrcIssues()

std::pair< std::uint32_t, std::uint32_t > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::qualitiesSrcIssues ( ReadView const & sb,
DebtDirection prevStepDebtDirection ) const
nodiscardprotectedinherited

Definition at line 83 of file MPTEndpointStep.cpp.

◆ qualities()

std::pair< std::uint32_t, std::uint32_t > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::qualities ( ReadView const & sb,
DebtDirection srcDebtDir,
StrandDirection strandDir ) const
nodiscardprotectedinherited

Definition at line 87 of file MPTEndpointStep.cpp.

◆ resetCache()

void xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::resetCache ( xrpl::DebtDirection dir)
protectedinherited

Definition at line 90 of file MPTEndpointStep.cpp.

◆ src()

AccountID const & xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::src ( ) const
nodiscardinherited

Definition at line 116 of file MPTEndpointStep.cpp.

◆ dst()

AccountID const & xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::dst ( ) const
nodiscardinherited

Definition at line 121 of file MPTEndpointStep.cpp.

◆ mptID()

MPTID const & xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::mptID ( ) const
nodiscardinherited

Definition at line 126 of file MPTEndpointStep.cpp.

◆ cachedIn()

std::optional< EitherAmount > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::cachedIn ( ) const
nodiscardoverrideinherited

Definition at line 132 of file MPTEndpointStep.cpp.

◆ cachedOut()

std::optional< EitherAmount > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::cachedOut ( ) const
nodiscardoverrideinherited

Definition at line 140 of file MPTEndpointStep.cpp.

◆ directStepSrcAcct()

std::optional< AccountID > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::directStepSrcAcct ( ) const
nodiscardoverrideinherited

Definition at line 148 of file MPTEndpointStep.cpp.

◆ directStepAccts()

std::optional< std::pair< AccountID, AccountID > > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::directStepAccts ( ) const
nodiscardoverrideinherited

Definition at line 154 of file MPTEndpointStep.cpp.

◆ debtDirection()

DebtDirection xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::debtDirection ( ReadView const & sb,
StrandDirection dir ) const
nodiscardoverrideinherited

Definition at line 160 of file MPTEndpointStep.cpp.

◆ lineQualityIn()

std::uint32_t xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::lineQualityIn ( ReadView const & v) const
nodiscardoverrideinherited

Definition at line 163 of file MPTEndpointStep.cpp.

◆ qualityUpperBound()

std::pair< std::optional< Quality >, DebtDirection > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::qualityUpperBound ( ReadView const & v,
DebtDirection dir ) const
nodiscardoverrideinherited

Definition at line 166 of file MPTEndpointStep.cpp.

◆ revImp()

std::pair< MPTAmount, MPTAmount > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::revImp ( PaymentSandbox & sb,
ApplyView & afView,
boost::container::flat_set< uint256 > & ofrsToRm,
MPTAmount const & out )
inherited

Definition at line 169 of file MPTEndpointStep.cpp.

◆ fwdImp()

std::pair< MPTAmount, MPTAmount > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::fwdImp ( PaymentSandbox & sb,
ApplyView & afView,
boost::container::flat_set< uint256 > & ofrsToRm,
MPTAmount const & in )
inherited

Definition at line 176 of file MPTEndpointStep.cpp.

◆ validFwd()

std::pair< bool, EitherAmount > xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::validFwd ( PaymentSandbox & sb,
ApplyView & afView,
EitherAmount const & in )
overrideinherited

Definition at line 183 of file MPTEndpointStep.cpp.

◆ check() [2/2]

TER xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::check ( StrandContext const & ctx) const
nodiscardinherited

Definition at line 188 of file MPTEndpointStep.cpp.

◆ setCacheLimiting()

void xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::setCacheLimiting ( MPTAmount const & fwdIn,
MPTAmount const & fwdSrcToDst,
MPTAmount const & fwdOut,
DebtDirection srcDebtDir )
inherited

Definition at line 191 of file MPTEndpointStep.cpp.

◆ logStringImpl()

std::string xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::logStringImpl ( char const * name) const
protectedinherited

Definition at line 211 of file MPTEndpointStep.cpp.

◆ equal()

bool xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::equal ( Step const & rhs) const
nodiscardoverrideprivateinherited

Definition at line 221 of file MPTEndpointStep.cpp.

Member Data Documentation

◆ src_

AccountID const xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::src_
protectedinherited

Definition at line 39 of file MPTEndpointStep.cpp.

◆ dst_

AccountID const xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::dst_
protectedinherited

Definition at line 40 of file MPTEndpointStep.cpp.

◆ mptIssue_

MPTIssue const xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::mptIssue_
protectedinherited

Definition at line 41 of file MPTEndpointStep.cpp.

◆ prevStep_

Step const* const xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::prevStep_
protectedinherited

Definition at line 44 of file MPTEndpointStep.cpp.

◆ isLast_

bool const xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::isLast_
protectedinherited

Definition at line 45 of file MPTEndpointStep.cpp.

◆ isDirectBetweenHolders_

bool const xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::isDirectBetweenHolders_
protectedinherited

Definition at line 48 of file MPTEndpointStep.cpp.

◆ j_

Definition at line 49 of file MPTEndpointStep.cpp.

◆ cache_

std::optional<Cache> xrpl::MPTEndpointStep< MPTEndpointPaymentStep >::cache_
protectedinherited

Definition at line 68 of file MPTEndpointStep.cpp.

◆ TDerived

Definition at line 230 of file MPTEndpointStep.cpp.