rippled
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ripple::StrandContext Struct Reference

Context needed to build Strand Steps and for error checking. More...

#include <Steps.h>

Collaboration diagram for ripple::StrandContext:
Collaboration graph
[legend]

Public Member Functions

 StrandContext (ReadView const &view_, std::vector< std::unique_ptr< Step > > const &strand_, AccountID const &strandSrc_, AccountID const &strandDst_, Issue const &strandDeliver_, std::optional< Quality > const &limitQuality_, bool isLast_, bool ownerPaysTransferFee_, OfferCrossing offerCrossing_, bool isDefaultPath_, std::array< boost::container::flat_set< Issue >, 2 > &seenDirectIssues_, boost::container::flat_set< Issue > &seenBookOuts_, AMMContext &ammContext_, std::optional< uint256 > const &domainID, beast::Journal j_)
 StrandContext constructor.
 

Public Attributes

ReadView const & view
 Current ReadView.
 
AccountID const strandSrc
 Strand source account.
 
AccountID const strandDst
 Strand destination account.
 
Issue const strandDeliver
 Issue strand delivers.
 
std::optional< Quality > const limitQuality
 Worst accepted quality.
 
bool const isFirst
 true if Step is first in Strand
 
bool const isLast = false
 true if Step is last in Strand
 
bool const ownerPaysTransferFee
 true if owner, not sender, pays fee
 
OfferCrossing const offerCrossing
 Yes/Sell if offer crossing, not payment.
 
bool const isDefaultPath
 true if Strand is default path
 
size_t const strandSize
 Length of Strand.
 
Step const *const prevStep = nullptr
 The previous step in the strand.
 
std::array< boost::container::flat_set< Issue >, 2 > & seenDirectIssues
 A strand may not include the same account node more than once in the same currency.
 
boost::container::flat_set< Issue > & seenBookOuts
 A strand may not include an offer that output the same issue more than once.
 
AMMContextammContext
 
std::optional< uint256domainID
 
beast::Journal const j
 

Detailed Description

Context needed to build Strand Steps and for error checking.

Definition at line 532 of file Steps.h.

Constructor & Destructor Documentation

◆ StrandContext()

ripple::StrandContext::StrandContext ( ReadView const &  view_,
std::vector< std::unique_ptr< Step > > const &  strand_,
AccountID const &  strandSrc_,
AccountID const &  strandDst_,
Issue const &  strandDeliver_,
std::optional< Quality > const &  limitQuality_,
bool  isLast_,
bool  ownerPaysTransferFee_,
OfferCrossing  offerCrossing_,
bool  isDefaultPath_,
std::array< boost::container::flat_set< Issue >, 2 > &  seenDirectIssues_,
boost::container::flat_set< Issue > &  seenBookOuts_,
AMMContext ammContext_,
std::optional< uint256 > const &  domainID,
beast::Journal  j_ 
)

StrandContext constructor.

Journal for logging

Parameters
seenDirectIssues_For detecting currency loops
seenBookOuts_For detecting book loops

Definition at line 590 of file PaySteps.cpp.

Member Data Documentation

◆ view

ReadView const& ripple::StrandContext::view

Current ReadView.

Definition at line 534 of file Steps.h.

◆ strandSrc

AccountID const ripple::StrandContext::strandSrc

Strand source account.

Definition at line 535 of file Steps.h.

◆ strandDst

AccountID const ripple::StrandContext::strandDst

Strand destination account.

Definition at line 536 of file Steps.h.

◆ strandDeliver

Issue const ripple::StrandContext::strandDeliver

Issue strand delivers.

Definition at line 537 of file Steps.h.

◆ limitQuality

std::optional<Quality> const ripple::StrandContext::limitQuality

Worst accepted quality.

Definition at line 538 of file Steps.h.

◆ isFirst

bool const ripple::StrandContext::isFirst

true if Step is first in Strand

Definition at line 539 of file Steps.h.

◆ isLast

bool const ripple::StrandContext::isLast = false

true if Step is last in Strand

Definition at line 540 of file Steps.h.

◆ ownerPaysTransferFee

bool const ripple::StrandContext::ownerPaysTransferFee

true if owner, not sender, pays fee

Definition at line 541 of file Steps.h.

◆ offerCrossing

OfferCrossing const ripple::StrandContext::offerCrossing

Yes/Sell if offer crossing, not payment.

Definition at line 543 of file Steps.h.

◆ isDefaultPath

bool const ripple::StrandContext::isDefaultPath

true if Strand is default path

Definition at line 544 of file Steps.h.

◆ strandSize

size_t const ripple::StrandContext::strandSize

Length of Strand.

Definition at line 545 of file Steps.h.

◆ prevStep

Step const* const ripple::StrandContext::prevStep = nullptr

The previous step in the strand.

Needed to check the no ripple constraint

Definition at line 549 of file Steps.h.

◆ seenDirectIssues

std::array<boost::container::flat_set<Issue>, 2>& ripple::StrandContext::seenDirectIssues

A strand may not include the same account node more than once in the same currency.

In a direct step, an account will show up at most twice: once as a src and once as a dst (hence the two element array). The strandSrc and strandDst will only show up once each.

Definition at line 555 of file Steps.h.

◆ seenBookOuts

boost::container::flat_set<Issue>& ripple::StrandContext::seenBookOuts

A strand may not include an offer that output the same issue more than once.

Definition at line 559 of file Steps.h.

◆ ammContext

AMMContext& ripple::StrandContext::ammContext

Definition at line 560 of file Steps.h.

◆ domainID

std::optional<uint256> ripple::StrandContext::domainID

Definition at line 561 of file Steps.h.

◆ j

beast::Journal const ripple::StrandContext::j

Definition at line 562 of file Steps.h.