xrpld
Loading...
Searching...
No Matches
xrpl::test::ExistingElementPool Struct Reference
Collaboration diagram for xrpl::test::ExistingElementPool:

Classes

struct  StateGuard

Public Types

using ResetState = std::tuple<size_t, size_t>

Public Member Functions

jtx::Account getAccount (size_t id)
xrpl::Currency getCurrency (size_t id)
ResetState getResetState () const
void resetTo (ResetState const &s)
void setupEnv (jtx::Env &env, size_t numAct, size_t numCur, std::optional< size_t > const &offererIndex)
std::int64_t totalXRP (ReadView const &v, bool incRoot)
bool checkBalances (ReadView const &v1, ReadView const &v2)
jtx::Account getAvailAccount ()
xrpl::Currency getAvailCurrency ()
template<class F>
void forEachElementPair (STAmount const &sendMax, STAmount const &deliver, std::vector< STPathElement > const &prefix, std::vector< STPathElement > const &suffix, std::optional< AccountID > const &existingAcc, std::optional< Currency > const &existingCur, std::optional< AccountID > const &existingIss, F &&f)

Public Attributes

std::vector< jtx::Accountaccounts
std::vector< xrpl::Currencycurrencies
std::vector< std::stringcurrencyNames
size_t nextAvailAccount = 0
size_t nextAvailCurrency = 0

Detailed Description

Definition at line 240 of file PayStrand_test.cpp.

Member Typedef Documentation

◆ ResetState

Definition at line 265 of file PayStrand_test.cpp.

Member Function Documentation

◆ getAccount()

jtx::Account xrpl::test::ExistingElementPool::getAccount ( size_t id)

Definition at line 247 of file PayStrand_test.cpp.

◆ getCurrency()

xrpl::Currency xrpl::test::ExistingElementPool::getCurrency ( size_t id)

Definition at line 254 of file PayStrand_test.cpp.

◆ getResetState()

ResetState xrpl::test::ExistingElementPool::getResetState ( ) const
nodiscard

Definition at line 267 of file PayStrand_test.cpp.

◆ resetTo()

void xrpl::test::ExistingElementPool::resetTo ( ResetState const & s)

Definition at line 273 of file PayStrand_test.cpp.

◆ setupEnv()

void xrpl::test::ExistingElementPool::setupEnv ( jtx::Env & env,
size_t numAct,
size_t numCur,
std::optional< size_t > const & offererIndex )

Definition at line 298 of file PayStrand_test.cpp.

◆ totalXRP()

std::int64_t xrpl::test::ExistingElementPool::totalXRP ( ReadView const & v,
bool incRoot )

Definition at line 400 of file PayStrand_test.cpp.

◆ checkBalances()

bool xrpl::test::ExistingElementPool::checkBalances ( ReadView const & v1,
ReadView const & v2 )

Definition at line 421 of file PayStrand_test.cpp.

◆ getAvailAccount()

jtx::Account xrpl::test::ExistingElementPool::getAvailAccount ( )

Definition at line 469 of file PayStrand_test.cpp.

◆ getAvailCurrency()

xrpl::Currency xrpl::test::ExistingElementPool::getAvailCurrency ( )

Definition at line 475 of file PayStrand_test.cpp.

◆ forEachElementPair()

template<class F>
void xrpl::test::ExistingElementPool::forEachElementPair ( STAmount const & sendMax,
STAmount const & deliver,
std::vector< STPathElement > const & prefix,
std::vector< STPathElement > const & suffix,
std::optional< AccountID > const & existingAcc,
std::optional< Currency > const & existingCur,
std::optional< AccountID > const & existingIss,
F && f )

Definition at line 482 of file PayStrand_test.cpp.

Member Data Documentation

◆ accounts

std::vector<jtx::Account> xrpl::test::ExistingElementPool::accounts

Definition at line 242 of file PayStrand_test.cpp.

◆ currencies

std::vector<xrpl::Currency> xrpl::test::ExistingElementPool::currencies

Definition at line 243 of file PayStrand_test.cpp.

◆ currencyNames

std::vector<std::string> xrpl::test::ExistingElementPool::currencyNames

Definition at line 244 of file PayStrand_test.cpp.

◆ nextAvailAccount

size_t xrpl::test::ExistingElementPool::nextAvailAccount = 0

Definition at line 262 of file PayStrand_test.cpp.

◆ nextAvailCurrency

size_t xrpl::test::ExistingElementPool::nextAvailCurrency = 0

Definition at line 263 of file PayStrand_test.cpp.