xrpld
Loading...
Searching...
No Matches
xrpl::detail Namespace Reference

Classes

struct  IsContiguousContainer
struct  IsContiguousContainer< Container, std::void_t< decltype(std::declval< Container const >().size()), decltype(std::declval< Container const >().data()), typename Container::value_type > >
struct  IsContiguousContainer< Slice >
struct  AlwaysFalseT
struct  LocalValues
class  CachedViewImpl
class  ApplyStateTable
class  ApplyViewBase
class  RawStateTable
class  ReadViewFwdIter
class  ReadViewFwdRange
struct  PaymentComponents
struct  ExtendedPaymentComponents
struct  LoanStateDeltas
class  DeferredCredits
class  AccountIDTag
struct  CombineVisitors
struct  DefaultObjectT
struct  NonPresentObjectT
class  STVar
class  TokenCodecErrcCategory
struct  BasicSha512HalfHasher
 Returns the SHA512-Half digest of a message. More...
struct  MultiApiJson
class  CurrencyTag
class  DirectoryTag
class  NodeIDTag
class  BasicFullBelowCache
 Remembers which tree keys have all descendants resident. More...
class  AccountIdCache
 Caches the base58 representations of AccountIDs. More...
class  Generator
 Produces a sequence of secp256k1 key pairs. More...
class  TestUserTypeMember
class  TestUserTypeFree
class  FileCfgGuard
 Write an xrpld config file and remove when done. More...
class  ValidatorsTxtGuard
 Write a validators.txt file and remove when done. More...
struct  NoEdgeData
struct  EpsilonMultiple
class  FlagsHelper
class  SaveStreamState
class  DirGuard
 Create a directory and remove it when it's done. More...
class  FileDirGuard
 Write a file in a directory and remove when done. More...
struct  CaseResults
struct  SuiteResults
struct  Results
class  MultiRunnerBase
struct  PeerDataCounts
class  Work
class  WorkBase
class  WorkFile
class  WorkPlain
class  WorkSSL
class  VotableValue
struct  DatabasePairValid
struct  MessageHeader
class  ServerDefinitions

Concepts

concept  SomeChar
concept  ValidConstructSTArgs
concept  some_integral_constant

Typedefs

using seed_pair = std::pair<std::uint64_t, std::uint64_t>
template<class Engine, class Result = typename Engine::result_type>
using is_engine = std::is_invocable_r<Result, Engine>
template<class T>
using test_hardened_unordered_set = std::unordered_set<T, HardenedHash<>>
template<class T>
using test_hardened_unordered_map = std::unordered_map<T, int, HardenedHash<>>
template<class T>
using test_hardened_unordered_multiset = std::unordered_multiset<T, HardenedHash<>>
template<class T>
using test_hardened_unordered_multimap = std::unordered_multimap<T, int, HardenedHash<>>
using clock_type = std::chrono::steady_clock
using response_type = boost::beast::http::response<boost::beast::http::string_body>

Enumerations

enum class  PaymentSpecialCase { None , Final , Extra }
enum class  TableType { Ledgers , Transactions , AccountTransactions }

Functions

template<bool = true>
seed_pair makeSeedPair () noexcept
template<class = void>
boost::thread_specific_ptr< detail::LocalValues > & getLocalValues ()
consteval std::array< std::uint64_t, kInt64DigitsbuildPowersOfTen ()
void spinPause () noexcept
 Inform the processor that we are in a tight spin-wait loop.
std::optional< int > hexCharToInt (SomeChar auto hexChar)
Number reduceOffer (auto const &amount)
Number::RoundingMode getLPTokenRounding (IsDeposit isDeposit)
Number::RoundingMode getAssetRounding (IsDeposit isDeposit)
template<class V, class N, class = std::enable_if_t< std::is_same_v<std::remove_cv_t<N>, SLE> && std::is_base_of_v<ReadView, V>>>
bool internalDirNext (V &view, uint256 const &root, std::shared_ptr< N > &page, unsigned int &index, uint256 &entry)
template<class V, class N, class = std::enable_if_t< std::is_same_v<std::remove_cv_t<N>, SLE> && std::is_base_of_v<ReadView, V>>>
bool internalDirFirst (V &view, uint256 const &root, std::shared_ptr< N > &page, unsigned int &index, uint256 &entry)
std::expected< std::pair< LoanPaymentParts, LoanProperties >, TERtryOverpayment (Rules const &rules, Asset const &asset, std::int32_t loanScale, ExtendedPaymentComponents const &overpaymentComponents, LoanState const &roundedLoanState, Number const &periodicPayment, Number const &periodicRate, std::uint32_t paymentRemaining, TenthBips16 const managementFeeRate, beast::Journal j)
Number computePowerMinusOne (Number const &periodicRate, std::uint32_t paymentsRemaining)
Number computePowerMinusOneHybrid (Number const &periodicRate, std::uint32_t paymentsRemaining)
Number computePaymentFactor (Rules const &rules, Number const &periodicRate, std::uint32_t paymentsRemaining)
std::pair< Number, NumbercomputeInterestAndFeeParts (Asset const &asset, Number const &interest, TenthBips16 managementFeeRate, std::int32_t loanScale)
Number loanPeriodicPayment (Rules const &rules, Number const &principalOutstanding, Number const &periodicRate, std::uint32_t paymentsRemaining)
Number loanPrincipalFromPeriodicPayment (Rules const &rules, Number const &periodicPayment, Number const &periodicRate, std::uint32_t paymentsRemaining)
Number loanLatePaymentInterest (Number const &principalOutstanding, TenthBips32 lateInterestRate, NetClock::time_point parentCloseTime, std::uint32_t nextPaymentDueDate)
Number loanAccruedInterest (Number const &principalOutstanding, Number const &periodicRate, NetClock::time_point parentCloseTime, std::uint32_t startDate, std::uint32_t prevPaymentDate, std::uint32_t paymentInterval)
ExtendedPaymentComponents computeOverpaymentComponents (Rules const &rules, Asset const &asset, int32_t const loanScale, Number const &overpayment, TenthBips32 const overpaymentInterestRate, TenthBips32 const overpaymentFeeRate, TenthBips16 const managementFeeRate)
PaymentComponents computePaymentComponents (Rules const &rules, Asset const &asset, std::int32_t scale, Number const &totalValueOutstanding, Number const &principalOutstanding, Number const &managementFeeOutstanding, Number const &periodicPayment, Number const &periodicRate, std::uint32_t paymentRemaining, TenthBips16 managementFeeRate)
template<typename... Ts>
constexpr CombineVisitors< std::decay_t< Ts >... > makeCombineVisitors (Ts &&... ts)
template<typename Variant, typename... Visitors>
constexpr auto visit (Variant &&v, Visitors &&... visitors) -> decltype(auto)
template<class T, class... Args>
STVar makeStvar (Args &&... args)
bool operator== (STVar const &lhs, STVar const &rhs)
bool operator!= (STVar const &lhs, STVar const &rhs)
std::map< std::string, VoteBehavior > const & supportedAmendments ()
 Amendments that this server supports and the default voting behavior.
std::size_t numDownVotedAmendments ()
 Amendments that this server won't vote for by default.
std::size_t numUpVotedAmendments ()
 Amendments that this server will vote for by default.
constexpr std::uint32_t makeHashPrefix (char a, char b, char c)
SlabAllocatorSet< SHAMapItemgSlabber ({ { 128, megabytes(std::size_t(60)) }, { 192, megabytes(std::size_t(46)) }, { 272, megabytes(std::size_t(60)) }, { 384, megabytes(std::size_t(56)) }, { 564, megabytes(std::size_t(40)) }, { 772, megabytes(std::size_t(46)) }, { 1052, megabytes(std::size_t(60)) }, })
NotTEC preflightCheckSigningKey (STObject const &sigObject, beast::Journal j)
 Checks the validity of the transactor signing key.
std::optional< NotTECpreflightCheckSimulateKeys (ApplyFlags flags, STObject const &sigObject, beast::Journal j)
 Checks the special signing key state needed for simulation.
template<class NumberProxy, class UInt32Proxy, class UInt32OptionalProxy>
LoanPaymentParts doPayment (ExtendedPaymentComponents const &payment, NumberProxy &totalValueOutstandingProxy, NumberProxy &principalOutstandingProxy, NumberProxy &managementFeeOutstandingProxy, UInt32Proxy &paymentRemainingProxy, UInt32Proxy &prevPaymentDateProxy, UInt32OptionalProxy &nextDueDateProxy, std::uint32_t paymentInterval)
template<class NumberProxy>
std::expected< LoanPaymentParts, TERdoOverpayment (Rules const &rules, Asset const &asset, std::int32_t loanScale, ExtendedPaymentComponents const &overpaymentComponents, NumberProxy &totalValueOutstandingProxy, NumberProxy &principalOutstandingProxy, NumberProxy &managementFeeOutstandingProxy, NumberProxy &periodicPaymentProxy, Number const &periodicRate, std::uint32_t const paymentRemaining, TenthBips16 const managementFeeRate, beast::Journal j)
std::expected< ExtendedPaymentComponents, TERcomputeLatePayment (Asset const &asset, ApplyView const &view, Number const &principalOutstanding, std::int32_t nextDueDate, ExtendedPaymentComponents const &periodic, TenthBips32 lateInterestRate, std::int32_t loanScale, Number const &latePaymentFee, STAmount const &amount, TenthBips16 managementFeeRate, beast::Journal j)
std::expected< ExtendedPaymentComponents, TERcomputeFullPayment (Asset const &asset, ApplyView &view, Number const &principalOutstanding, Number const &managementFeeOutstanding, Number const &periodicPayment, std::uint32_t paymentRemaining, std::uint32_t prevPaymentDate, std::uint32_t const startDate, std::uint32_t const paymentInterval, TenthBips32 const closeInterestRate, std::int32_t loanScale, Number const &totalInterestOutstanding, Number const &periodicRate, Number const &closePaymentFee, STAmount const &amount, TenthBips16 managementFeeRate, beast::Journal j)
STAmount asAmount (Rate const &rate)
void copyUInt32 (std::uint8_t *out, std::uint32_t v)
uint256 deriveDeterministicRootKey (Seed const &seed)
std::string getSociSqliteInit (std::string const &name, std::string const &dir, std::string const &ext)
std::string getSociInit (BasicConfig const &config, std::string const &dbName)
static TER verifySendProofs (PreclaimContext const &ctx, std::shared_ptr< SLE const > const &sleSenderMPToken, std::shared_ptr< SLE const > const &sleDestinationMPToken, std::shared_ptr< SLE const > const &sleIssuance)
constexpr char const * realValidatorContents ()
std::string configContents (std::string const &dbPath, std::string const &validatorsFile)
std::string valFileContents ()
std::uint32_t ownedCountOf (ReadView const &view, AccountID const &id, LedgerEntryType type)
void ownedCountHelper (test::jtx::Env &env, AccountID const &id, LedgerEntryType type, std::uint32_t value)
template<class Cond, class... Args>
void requireArgs (test::jtx::requires_t &vec, Cond const &cond, Args const &... args)
template<class Rep, class Period>
std::ostreamprettyTime (std::ostream &os, std::chrono::duration< Rep, Period > d)
template<class Period, class Rep>
std::string fmtdur (std::chrono::duration< Period, Rep > const &d)
std::string fmtdur (typename clock_type::duration const &d)
static constexpr std::pair< bool, std::uint64_tsumOfFirstSquares (std::size_t xIn)
static std::string toString (TableType type)
 to_string Returns the name of a table according to its TableType.
DatabasePairValid makeLedgerDBs (Config const &config, DatabaseCon::Setup const &setup, DatabaseCon::CheckpointerSetup const &checkpointerSetup, beast::Journal j)
 makeLedgerDBs Opens ledger and transactions databases.
std::optional< LedgerIndexgetMinLedgerSeq (soci::session &session, TableType type)
 getMinLedgerSeq Returns minimum ledger sequence in given table.
std::optional< LedgerIndexgetMaxLedgerSeq (soci::session &session, TableType type)
 getMaxLedgerSeq Returns maximum ledger sequence in given table.
void deleteByLedgerSeq (soci::session &session, TableType type, LedgerIndex ledgerSeq)
 deleteByLedgerSeq Deletes all entries in given table for the ledger with given sequence.
void deleteBeforeLedgerSeq (soci::session &session, TableType type, LedgerIndex ledgerSeq)
 deleteBeforeLedgerSeq Deletes all entries in given table for the ledgers with given sequence and all sequences below it.
std::size_t getRows (soci::session &session, TableType type)
 getRows Returns number of rows in given table.
RelationalDatabase::CountMinMax getRowsMinMax (soci::session &session, TableType type)
 getRowsMinMax Returns minimum ledger sequence, maximum ledger sequence and total number of rows in given table.
bool saveValidatedLedger (DatabaseCon &ldgDB, std::unique_ptr< DatabaseCon > const &txnDB, Application &app, std::shared_ptr< Ledger const > const &ledger, bool current)
 saveValidatedLedger Saves ledger into database.
static std::optional< LedgerHeadergetLedgerInfo (soci::session &session, std::string const &sqlSuffix, beast::Journal j)
 getLedgerInfo Returns the info of the ledger retrieved from the database by using the provided SQL query suffix.
std::optional< LedgerHeadergetLedgerInfoByIndex (soci::session &session, LedgerIndex ledgerSeq, beast::Journal j)
 getLedgerInfoByIndex Returns ledger by its sequence.
std::optional< LedgerHeadergetNewestLedgerInfo (soci::session &session, beast::Journal j)
 getNewestLedgerInfo Returns info of newest saved ledger.
std::optional< LedgerHeadergetLimitedOldestLedgerInfo (soci::session &session, LedgerIndex ledgerFirstIndex, beast::Journal j)
 getLimitedOldestLedgerInfo Returns info of oldest ledger from ledgers with sequences greater or equal to given.
std::optional< LedgerHeadergetLimitedNewestLedgerInfo (soci::session &session, LedgerIndex ledgerFirstIndex, beast::Journal j)
 getLimitedNewestLedgerInfo Returns info of newest ledger from ledgers with sequences greater or equal to given.
std::optional< LedgerHeadergetLedgerInfoByHash (soci::session &session, uint256 const &ledgerHash, beast::Journal j)
 getLedgerInfoByHash Returns info of ledger with given hash.
uint256 getHashByIndex (soci::session &session, LedgerIndex ledgerIndex)
 getHashByIndex Returns hash of ledger with given sequence.
std::optional< LedgerHashPairgetHashesByIndex (soci::session &session, LedgerIndex ledgerIndex, beast::Journal j)
 getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequence.
std::map< LedgerIndex, LedgerHashPairgetHashesByIndex (soci::session &session, LedgerIndex minSeq, LedgerIndex maxSeq, beast::Journal j)
 getHashesByIndex Returns hash of the ledger and hash of parent ledger for all ledgers with sequences from given minimum limit to given maximum limit.
std::pair< std::vector< std::shared_ptr< Transaction > >, int > getTxHistory (soci::session &session, Application &app, LedgerIndex startIndex, int quantity)
 getTxHistory Returns given number of most recent transactions starting from given number of entry.
static std::string transactionsSQL (Application &app, std::string selection, RelationalDatabase::AccountTxOptions const &options, bool descending, bool binary, bool count, beast::Journal j)
 transactionsSQL Returns a SQL query for selecting the oldest or newest transactions in decoded or binary form for the account that matches the given criteria starting from the provided offset.
static std::pair< RelationalDatabase::AccountTxs, int > getAccountTxs (soci::session &session, Application &app, LedgerMaster &ledgerMaster, RelationalDatabase::AccountTxOptions const &options, bool descending, beast::Journal j)
 getAccountTxs Returns the oldest or newest transactions for the account that matches the given criteria starting from the provided offset.
std::pair< RelationalDatabase::AccountTxs, int > getOldestAccountTxs (soci::session &session, Application &app, LedgerMaster &ledgerMaster, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
 getOldestAccountTxs Returns oldest transactions for given account which match given criteria starting from given offset.
std::pair< RelationalDatabase::AccountTxs, int > getNewestAccountTxs (soci::session &session, Application &app, LedgerMaster &ledgerMaster, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
 getNewestAccountTxs Returns newest transactions for given account which match given criteria starting from given offset.
static std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > getAccountTxsB (soci::session &session, Application &app, RelationalDatabase::AccountTxOptions const &options, bool descending, beast::Journal j)
 getAccountTxsB Returns the oldest or newest transactions in binary form for the account that matches given criteria starting from the provided offset.
std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > getOldestAccountTxsB (soci::session &session, Application &app, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
 getOldestAccountTxsB Returns oldest transactions in binary form for given account which match given criteria starting from given offset.
std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > getNewestAccountTxsB (soci::session &session, Application &app, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
 getNewestAccountTxsB Returns newest transactions in binary form for given account which match given criteria starting from given offset.
static std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > accountTxPage (soci::session &session, std::function< void(std::uint32_t)> const &onUnsavedLedger, std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const &onTransaction, RelationalDatabase::AccountTxPageOptions const &options, std::uint32_t pageLength, bool forward)
 accountTxPage Searches for the oldest or newest transactions for the account that matches the given criteria starting from the provided marker and invokes the callback parameter for each found transaction.
std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > oldestAccountTxPage (soci::session &session, std::function< void(std::uint32_t)> const &onUnsavedLedger, std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const &onTransaction, RelationalDatabase::AccountTxPageOptions const &options, std::uint32_t pageLength)
 oldestAccountTxPage Searches oldest transactions for given account which match given criteria starting from given marker and calls callback for each found transaction.
std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > newestAccountTxPage (soci::session &session, std::function< void(std::uint32_t)> const &onUnsavedLedger, std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const &onTransaction, RelationalDatabase::AccountTxPageOptions const &options, std::uint32_t pageLength)
 newestAccountTxPage Searches newest transactions for given account which match given criteria starting from given marker and calls callback for each found transaction.
std::variant< RelationalDatabase::AccountTx, TxSearchedgetTransaction (soci::session &session, Application &app, uint256 const &id, std::optional< ClosedInterval< uint32_t > > const &range, ErrorCodeI &ec)
 getTransaction Returns transaction with given hash.
bool dbHasSpace (soci::session &session, Config const &config, beast::Journal j)
 dbHasSpace Checks if given database has available space.
template<typename BufferSequence>
auto buffersBegin (BufferSequence const &bufs)
template<typename BufferSequence>
auto buffersEnd (BufferSequence const &bufs)
template<class BufferSequence>
std::optional< MessageHeaderparseMessageHeader (boost::system::error_code &ec, BufferSequence const &bufs, std::size_t size)
 Parse a message header.
template<class T, class Buffers, class = std::enable_if_t<std::is_base_of_v<::google::protobuf::Message, T>>>
std::shared_ptr< T > parseMessageContent (MessageHeader const &header, Buffers const &buffers)
template<class T, class Buffers, class Handler, class = std::enable_if_t<std::is_base_of_v<::google::protobuf::Message, T>>>
bool invoke (MessageHeader const &header, Buffers const &buffers, Handler &handler)
template<class T>
std::vector< T > getTrustLineItems (AccountID const &accountID, ReadView const &view, LineDirection direction=LineDirection::Outgoing)
ServerDefinitions const & getDefinitions ()

Variables

constexpr std::size_t kInt64Digits = 20
 Builds a table of the powers of 10.
constexpr std::array< std::optional< int >, 256 > const kDigitLookupTable
DefaultObjectT gDefaultObject
NonPresentObjectT gNonPresentObject
static constexpr std::size_t kNumFeatures
template<typename T>
constexpr bool kIsIntegralConstant = false
template<typename I, auto A>
constexpr bool kIsIntegralConstant< std::integral_constant< I, A > & > = true
template<typename I, auto A>
constexpr bool kIsIntegralConstant< std::integral_constant< I, A > const & > = true
constexpr std::string_view kIsoCharSet
constexpr std::size_t kIsoCodeOffset = 12
constexpr std::size_t kIsoCodeLength = 3
constexpr auto kDefaultExpires = std::chrono::seconds{3600}
constexpr auto kDefaultEffectiveOverlap = std::chrono::seconds{30}
constexpr int kTableTypeCount = 3

Typedef Documentation

◆ seed_pair

◆ is_engine

template<class Engine, class Result = typename Engine::result_type>
using xrpl::detail::is_engine = std::is_invocable_r<Result, Engine>

Definition at line 34 of file include/xrpl/basics/random.h.

◆ test_hardened_unordered_set

Definition at line 68 of file hardened_hash_test.cpp.

◆ test_hardened_unordered_map

Definition at line 71 of file hardened_hash_test.cpp.

◆ test_hardened_unordered_multiset

◆ test_hardened_unordered_multimap

Definition at line 77 of file hardened_hash_test.cpp.

◆ clock_type

◆ response_type

using xrpl::detail::response_type = boost::beast::http::response<boost::beast::http::string_body>

Definition at line 8 of file Work.h.

Enumeration Type Documentation

◆ PaymentSpecialCase

Enumerator
None 
Final 
Extra 

Definition at line 272 of file LendingHelpers.h.

◆ TableType

enum class xrpl::detail::TableType
strong
Enumerator
Ledgers 
Transactions 
AccountTransactions 

Definition at line 11 of file Node.h.

Function Documentation

◆ makeSeedPair()

template<bool = true>
seed_pair xrpl::detail::makeSeedPair ( )
noexcept

Definition at line 19 of file hardened_hash.h.

◆ getLocalValues()

template<class = void>
boost::thread_specific_ptr< detail::LocalValues > & xrpl::detail::getLocalValues ( )

Definition at line 56 of file LocalValue.h.

◆ buildPowersOfTen()

std::array< std::uint64_t, kInt64Digits > xrpl::detail::buildPowersOfTen ( )
consteval

Definition at line 56 of file Number.h.

◆ spinPause()

void xrpl::detail::spinPause ( )
noexcept

Inform the processor that we are in a tight spin-wait loop.

Spinlocks caught in tight loops can result in the processor's pipeline filling up with comparison operations, resulting in a misprediction at the time the lock is finally acquired, necessitating pipeline flushing which is ridiculously expensive and results in very high latency.

This function instructs the processor to "pause" for some architecture specific amount of time, to prevent this.

Definition at line 29 of file spinlock.h.

◆ hexCharToInt()

std::optional< int > xrpl::detail::hexCharToInt ( SomeChar auto hexChar)

Definition at line 54 of file StringUtilities.h.

◆ reduceOffer()

Number xrpl::detail::reduceOffer ( auto const & amount)

Definition at line 27 of file AMMHelpers.h.

◆ getLPTokenRounding()

Number::RoundingMode xrpl::detail::getLPTokenRounding ( IsDeposit isDeposit)

Definition at line 600 of file AMMHelpers.h.

◆ getAssetRounding()

Number::RoundingMode xrpl::detail::getAssetRounding ( IsDeposit isDeposit)

Definition at line 609 of file AMMHelpers.h.

◆ internalDirNext()

template<class V, class N, class = std::enable_if_t< std::is_same_v<std::remove_cv_t<N>, SLE> && std::is_base_of_v<ReadView, V>>>
bool xrpl::detail::internalDirNext ( V & view,
uint256 const & root,
std::shared_ptr< N > & page,
unsigned int & index,
uint256 & entry )

Definition at line 24 of file DirectoryHelpers.h.

◆ internalDirFirst()

template<class V, class N, class = std::enable_if_t< std::is_same_v<std::remove_cv_t<N>, SLE> && std::is_base_of_v<ReadView, V>>>
bool xrpl::detail::internalDirFirst ( V & view,
uint256 const & root,
std::shared_ptr< N > & page,
unsigned int & index,
uint256 & entry )

Definition at line 73 of file DirectoryHelpers.h.

◆ tryOverpayment()

std::expected< std::pair< LoanPaymentParts, LoanProperties >, TER > xrpl::detail::tryOverpayment ( Rules const & rules,
Asset const & asset,
std::int32_t loanScale,
ExtendedPaymentComponents const & overpaymentComponents,
LoanState const & roundedLoanState,
Number const & periodicPayment,
Number const & periodicRate,
std::uint32_t paymentRemaining,
TenthBips16 const managementFeeRate,
beast::Journal j )

Definition at line 518 of file LendingHelpers.cpp.

◆ computePowerMinusOne()

Number xrpl::detail::computePowerMinusOne ( Number const & periodicRate,
std::uint32_t paymentsRemaining )
nodiscard

Definition at line 159 of file LendingHelpers.cpp.

◆ computePowerMinusOneHybrid()

Number xrpl::detail::computePowerMinusOneHybrid ( Number const & periodicRate,
std::uint32_t paymentsRemaining )
nodiscard

Definition at line 198 of file LendingHelpers.cpp.

◆ computePaymentFactor()

Number xrpl::detail::computePaymentFactor ( Rules const & rules,
Number const & periodicRate,
std::uint32_t paymentsRemaining )
nodiscard

Definition at line 226 of file LendingHelpers.cpp.

◆ computeInterestAndFeeParts()

std::pair< Number, Number > xrpl::detail::computeInterestAndFeeParts ( Asset const & asset,
Number const & interest,
TenthBips16 managementFeeRate,
std::int32_t loanScale )

Definition at line 304 of file LendingHelpers.cpp.

◆ loanPeriodicPayment()

Number xrpl::detail::loanPeriodicPayment ( Rules const & rules,
Number const & principalOutstanding,
Number const & periodicRate,
std::uint32_t paymentsRemaining )

Definition at line 261 of file LendingHelpers.cpp.

◆ loanPrincipalFromPeriodicPayment()

Number xrpl::detail::loanPrincipalFromPeriodicPayment ( Rules const & rules,
Number const & periodicPayment,
Number const & periodicRate,
std::uint32_t paymentsRemaining )

Definition at line 283 of file LendingHelpers.cpp.

◆ loanLatePaymentInterest()

Number xrpl::detail::loanLatePaymentInterest ( Number const & principalOutstanding,
TenthBips32 lateInterestRate,
NetClock::time_point parentCloseTime,
std::uint32_t nextPaymentDueDate )

Definition at line 321 of file LendingHelpers.cpp.

◆ loanAccruedInterest()

Number xrpl::detail::loanAccruedInterest ( Number const & principalOutstanding,
Number const & periodicRate,
NetClock::time_point parentCloseTime,
std::uint32_t startDate,
std::uint32_t prevPaymentDate,
std::uint32_t paymentInterval )

Definition at line 354 of file LendingHelpers.cpp.

◆ computeOverpaymentComponents()

ExtendedPaymentComponents xrpl::detail::computeOverpaymentComponents ( Rules const & rules,
Asset const & asset,
int32_t const loanScale,
Number const & overpayment,
TenthBips32 const overpaymentInterestRate,
TenthBips32 const overpaymentFeeRate,
TenthBips16 const managementFeeRate )

Definition at line 1320 of file LendingHelpers.cpp.

◆ computePaymentComponents()

PaymentComponents xrpl::detail::computePaymentComponents ( Rules const & rules,
Asset const & asset,
std::int32_t scale,
Number const & totalValueOutstanding,
Number const & principalOutstanding,
Number const & managementFeeOutstanding,
Number const & periodicPayment,
Number const & periodicRate,
std::uint32_t paymentRemaining,
TenthBips16 managementFeeRate )

Definition at line 1093 of file LendingHelpers.cpp.

◆ makeCombineVisitors()

template<typename... Ts>
CombineVisitors< std::decay_t< Ts >... > xrpl::detail::makeCombineVisitors ( Ts &&... ts)
constexpr

Definition at line 62 of file Concepts.h.

◆ visit()

template<typename Variant, typename... Visitors>
auto xrpl::detail::visit ( Variant && v,
Visitors &&... visitors ) -> decltype(auto)
constexpr

Definition at line 74 of file Concepts.h.

◆ makeStvar()

template<class T, class... Args>
STVar xrpl::detail::makeStvar ( Args &&... args)

Definition at line 141 of file STVar.h.

◆ operator==()

bool xrpl::detail::operator== ( STVar const & lhs,
STVar const & rhs )

Definition at line 149 of file STVar.h.

◆ operator!=()

bool xrpl::detail::operator!= ( STVar const & lhs,
STVar const & rhs )

Definition at line 155 of file STVar.h.

◆ supportedAmendments()

std::map< std::string, VoteBehavior > const & xrpl::detail::supportedAmendments ( )

Amendments that this server supports and the default voting behavior.

Amendments that this server supports.

Whether they are enabled depends on the Rules defined in the validated ledger

Definition at line 327 of file libxrpl/protocol/Feature.cpp.

◆ numDownVotedAmendments()

std::size_t xrpl::detail::numDownVotedAmendments ( )

Amendments that this server won't vote for by default.

This function is only used in unit tests.

Definition at line 334 of file libxrpl/protocol/Feature.cpp.

◆ numUpVotedAmendments()

std::size_t xrpl::detail::numUpVotedAmendments ( )

Amendments that this server will vote for by default.

This function is only used in unit tests.

Definition at line 341 of file libxrpl/protocol/Feature.cpp.

◆ makeHashPrefix()

std::uint32_t xrpl::detail::makeHashPrefix ( char a,
char b,
char c )
constexpr

Definition at line 12 of file HashPrefix.h.

◆ gSlabber()

SlabAllocatorSet< SHAMapItem > xrpl::detail::gSlabber ( { { 128, megabytes(std::size_t(60)) }, { 192, megabytes(std::size_t(46)) }, { 272, megabytes(std::size_t(60)) }, { 384, megabytes(std::size_t(56)) }, { 564, megabytes(std::size_t(40)) }, { 772, megabytes(std::size_t(46)) }, { 1052, megabytes(std::size_t(60)) }, } )

◆ preflightCheckSigningKey()

NotTEC xrpl::detail::preflightCheckSigningKey ( STObject const & sigObject,
beast::Journal j )

Checks the validity of the transactor signing key.

Normally called from preflight1 with ctx.tx.

Normally called from preflight1.

Definition at line 118 of file Transactor.cpp.

◆ preflightCheckSimulateKeys()

std::optional< NotTEC > xrpl::detail::preflightCheckSimulateKeys ( ApplyFlags flags,
STObject const & sigObject,
beast::Journal j )

Checks the special signing key state needed for simulation.

Normally called from preflight2 with ctx.tx.

Definition at line 130 of file Transactor.cpp.

◆ doPayment()

template<class NumberProxy, class UInt32Proxy, class UInt32OptionalProxy>
LoanPaymentParts xrpl::detail::doPayment ( ExtendedPaymentComponents const & payment,
NumberProxy & totalValueOutstandingProxy,
NumberProxy & principalOutstandingProxy,
NumberProxy & managementFeeOutstandingProxy,
UInt32Proxy & paymentRemainingProxy,
UInt32Proxy & prevPaymentDateProxy,
UInt32OptionalProxy & nextDueDateProxy,
std::uint32_t paymentInterval )

Definition at line 396 of file LendingHelpers.cpp.

◆ doOverpayment()

template<class NumberProxy>
std::expected< LoanPaymentParts, TER > xrpl::detail::doOverpayment ( Rules const & rules,
Asset const & asset,
std::int32_t loanScale,
ExtendedPaymentComponents const & overpaymentComponents,
NumberProxy & totalValueOutstandingProxy,
NumberProxy & principalOutstandingProxy,
NumberProxy & managementFeeOutstandingProxy,
NumberProxy & periodicPaymentProxy,
Number const & periodicRate,
std::uint32_t const paymentRemaining,
TenthBips16 const managementFeeRate,
beast::Journal j )

Definition at line 722 of file LendingHelpers.cpp.

◆ computeLatePayment()

std::expected< ExtendedPaymentComponents, TER > xrpl::detail::computeLatePayment ( Asset const & asset,
ApplyView const & view,
Number const & principalOutstanding,
std::int32_t nextDueDate,
ExtendedPaymentComponents const & periodic,
TenthBips32 lateInterestRate,
std::int32_t loanScale,
Number const & latePaymentFee,
STAmount const & amount,
TenthBips16 managementFeeRate,
beast::Journal j )

Definition at line 864 of file LendingHelpers.cpp.

◆ computeFullPayment()

std::expected< ExtendedPaymentComponents, TER > xrpl::detail::computeFullPayment ( Asset const & asset,
ApplyView & view,
Number const & principalOutstanding,
Number const & managementFeeOutstanding,
Number const & periodicPayment,
std::uint32_t paymentRemaining,
std::uint32_t prevPaymentDate,
std::uint32_t const startDate,
std::uint32_t const paymentInterval,
TenthBips32 const closeInterestRate,
std::int32_t loanScale,
Number const & totalInterestOutstanding,
Number const & periodicRate,
Number const & closePaymentFee,
STAmount const & amount,
TenthBips16 managementFeeRate,
beast::Journal j )

Definition at line 958 of file LendingHelpers.cpp.

◆ asAmount()

STAmount xrpl::detail::asAmount ( Rate const & rate)

Definition at line 17 of file Rate2.cpp.

◆ copyUInt32()

void xrpl::detail::copyUInt32 ( std::uint8_t * out,
std::uint32_t v )

Definition at line 59 of file SecretKey.cpp.

◆ deriveDeterministicRootKey()

uint256 xrpl::detail::deriveDeterministicRootKey ( Seed const & seed)

Definition at line 68 of file SecretKey.cpp.

◆ getSociSqliteInit()

std::string xrpl::detail::getSociSqliteInit ( std::string const & name,
std::string const & dir,
std::string const & ext )

Definition at line 41 of file SociDB.cpp.

◆ getSociInit()

std::string xrpl::detail::getSociInit ( BasicConfig const & config,
std::string const & dbName )

Definition at line 55 of file SociDB.cpp.

◆ verifySendProofs()

TER xrpl::detail::verifySendProofs ( PreclaimContext const & ctx,
std::shared_ptr< SLE const > const & sleSenderMPToken,
std::shared_ptr< SLE const > const & sleDestinationMPToken,
std::shared_ptr< SLE const > const & sleIssuance )
static

Definition at line 103 of file ConfidentialMPTSend.cpp.

◆ realValidatorContents()

char const * xrpl::detail::realValidatorContents ( )
constexpr

Definition at line 36 of file ValidatorSite_test.cpp.

◆ configContents()

std::string xrpl::detail::configContents ( std::string const & dbPath,
std::string const & validatorsFile )

Definition at line 37 of file Config_test.cpp.

◆ valFileContents()

std::string xrpl::detail::valFileContents ( )

Definition at line 129 of file Config_test.cpp.

◆ ownedCountOf()

std::uint32_t xrpl::detail::ownedCountOf ( ReadView const & view,
AccountID const & id,
LedgerEntryType type )

Definition at line 17 of file owners.cpp.

◆ ownedCountHelper()

void xrpl::detail::ownedCountHelper ( test::jtx::Env & env,
AccountID const & id,
LedgerEntryType type,
std::uint32_t value )

Definition at line 28 of file owners.cpp.

◆ requireArgs()

template<class Cond, class... Args>
void xrpl::detail::requireArgs ( test::jtx::requires_t & vec,
Cond const & cond,
Args const &... args )

Definition at line 14 of file require.h.

◆ prettyTime()

template<class Rep, class Period>
std::ostream & xrpl::detail::prettyTime ( std::ostream & os,
std::chrono::duration< Rep, Period > d )

Definition at line 100 of file import_test.cpp.

◆ fmtdur() [1/2]

template<class Period, class Rep>
std::string xrpl::detail::fmtdur ( std::chrono::duration< Period, Rep > const & d)

Definition at line 189 of file import_test.cpp.

◆ fmtdur() [2/2]

std::string xrpl::detail::fmtdur ( typename clock_type::duration const & d)

Definition at line 34 of file multi_runner.cpp.

◆ sumOfFirstSquares()

constexpr std::pair< bool, std::uint64_t > xrpl::detail::sumOfFirstSquares ( std::size_t xIn)
staticconstexpr

Definition at line 205 of file TxQ.cpp.

◆ toString()

std::string xrpl::detail::toString ( TableType type)
static

to_string Returns the name of a table according to its TableType.

Parameters
typeAn enum denoting the table's type.
Returns
Name of the table.

Definition at line 77 of file Node.cpp.

◆ makeLedgerDBs()

DatabasePairValid xrpl::detail::makeLedgerDBs ( Config const & config,
DatabaseCon::Setup const & setup,
DatabaseCon::CheckpointerSetup const & checkpointerSetup,
beast::Journal j )

makeLedgerDBs Opens ledger and transactions databases.

Parameters
configConfig object.
setupPath to database and opening parameters.
checkpointerSetupDatabase checkpointer setup.
jJournal.
Returns
Struct DatabasePairValid which contain unique pointers to ledger and transaction databases and flag if opening was successful.

Definition at line 98 of file Node.cpp.

◆ getMinLedgerSeq()

std::optional< LedgerIndex > xrpl::detail::getMinLedgerSeq ( soci::session & session,
TableType type )

getMinLedgerSeq Returns minimum ledger sequence in given table.

Parameters
sessionSession with database.
typeTable ID for which the result is returned.
Returns
Ledger sequence or none if no ledgers exist.

Definition at line 154 of file Node.cpp.

◆ getMaxLedgerSeq()

std::optional< LedgerIndex > xrpl::detail::getMaxLedgerSeq ( soci::session & session,
TableType type )

getMaxLedgerSeq Returns maximum ledger sequence in given table.

Parameters
sessionSession with database.
typeTable ID for which the result is returned.
Returns
Ledger sequence or none if no ledgers exist.

Definition at line 164 of file Node.cpp.

◆ deleteByLedgerSeq()

void xrpl::detail::deleteByLedgerSeq ( soci::session & session,
TableType type,
LedgerIndex ledgerSeq )

deleteByLedgerSeq Deletes all entries in given table for the ledger with given sequence.

Parameters
sessionSession with database.
typeTable ID from which entries will be deleted.
ledgerSeqLedger sequence.

Definition at line 174 of file Node.cpp.

◆ deleteBeforeLedgerSeq()

void xrpl::detail::deleteBeforeLedgerSeq ( soci::session & session,
TableType type,
LedgerIndex ledgerSeq )

deleteBeforeLedgerSeq Deletes all entries in given table for the ledgers with given sequence and all sequences below it.

Parameters
sessionSession with database.
typeTable ID from which entries will be deleted.
ledgerSeqLedger sequence.

Definition at line 180 of file Node.cpp.

◆ getRows()

std::size_t xrpl::detail::getRows ( soci::session & session,
TableType type )

getRows Returns number of rows in given table.

Parameters
sessionSession with database.
typeTable ID for which the result is returned.
Returns
Number of rows.

Definition at line 186 of file Node.cpp.

◆ getRowsMinMax()

RelationalDatabase::CountMinMax xrpl::detail::getRowsMinMax ( soci::session & session,
TableType type )

getRowsMinMax Returns minimum ledger sequence, maximum ledger sequence and total number of rows in given table.

Parameters
sessionSession with database.
typeTable ID for which the result is returned.
Returns
Struct CountMinMax which contain minimum sequence, maximum sequence and number of rows.

Definition at line 198 of file Node.cpp.

◆ saveValidatedLedger()

bool xrpl::detail::saveValidatedLedger ( DatabaseCon & ldgDB,
std::unique_ptr< DatabaseCon > const & txnDB,
Application & app,
std::shared_ptr< Ledger const > const & ledger,
bool current )

saveValidatedLedger Saves ledger into database.

Parameters
lgrDBLink to ledgers database.
txnDBLink to transactions database.
appApplication object.
ledgerThe ledger.
currentTrue if ledger is current.
Returns
True is saving was successful.

Definition at line 213 of file Node.cpp.

◆ getLedgerInfo()

std::optional< LedgerHeader > xrpl::detail::getLedgerInfo ( soci::session & session,
std::string const & sqlSuffix,
beast::Journal j )
static

getLedgerInfo Returns the info of the ledger retrieved from the database by using the provided SQL query suffix.

Parameters
sessionSession with the database.
sqlSuffixSQL string used to specify the sought ledger.
jJournal.
Returns
Ledger info or no value if the ledger was not found.

Definition at line 420 of file Node.cpp.

◆ getLedgerInfoByIndex()

std::optional< LedgerHeader > xrpl::detail::getLedgerInfoByIndex ( soci::session & session,
LedgerIndex ledgerSeq,
beast::Journal j )

getLedgerInfoByIndex Returns ledger by its sequence.

Parameters
sessionSession with database.
ledgerSeqLedger sequence.
jJournal.
Returns
Ledger or none if ledger not found.

Definition at line 485 of file Node.cpp.

◆ getNewestLedgerInfo()

std::optional< LedgerHeader > xrpl::detail::getNewestLedgerInfo ( soci::session & session,
beast::Journal j )

getNewestLedgerInfo Returns info of newest saved ledger.

Parameters
sessionSession with database.
jJournal.
Returns
Ledger info or none if ledger not found.

Definition at line 493 of file Node.cpp.

◆ getLimitedOldestLedgerInfo()

std::optional< LedgerHeader > xrpl::detail::getLimitedOldestLedgerInfo ( soci::session & session,
LedgerIndex ledgerFirstIndex,
beast::Journal j )

getLimitedOldestLedgerInfo Returns info of oldest ledger from ledgers with sequences greater or equal to given.

Parameters
sessionSession with database.
ledgerFirstIndexMinimum ledger sequence.
jJournal.
Returns
Ledger info or none if ledger not found.

Definition at line 501 of file Node.cpp.

◆ getLimitedNewestLedgerInfo()

std::optional< LedgerHeader > xrpl::detail::getLimitedNewestLedgerInfo ( soci::session & session,
LedgerIndex ledgerFirstIndex,
beast::Journal j )

getLimitedNewestLedgerInfo Returns info of newest ledger from ledgers with sequences greater or equal to given.

Parameters
sessionSession with database.
ledgerFirstIndexMinimum ledger sequence.
jJournal.
Returns
Ledger info or none if ledger not found.

Definition at line 510 of file Node.cpp.

◆ getLedgerInfoByHash()

std::optional< LedgerHeader > xrpl::detail::getLedgerInfoByHash ( soci::session & session,
uint256 const & ledgerHash,
beast::Journal j )

getLedgerInfoByHash Returns info of ledger with given hash.

Parameters
sessionSession with database.
ledgerHashHash of the ledger.
jJournal.
Returns
Ledger or none if ledger not found.

Definition at line 519 of file Node.cpp.

◆ getHashByIndex()

uint256 xrpl::detail::getHashByIndex ( soci::session & session,
LedgerIndex ledgerIndex )

getHashByIndex Returns hash of ledger with given sequence.

Parameters
sessionSession with database.
ledgerIndexLedger sequence.
Returns
Hash of the ledger.

Definition at line 527 of file Node.cpp.

◆ getHashesByIndex() [1/2]

std::optional< LedgerHashPair > xrpl::detail::getHashesByIndex ( soci::session & session,
LedgerIndex ledgerIndex,
beast::Journal j )

getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequence.

Parameters
sessionSession with database.
ledgerIndexLedger sequence.
jJournal.
Returns
Struct LedgerHashPair which contain hashes of the ledger and its parent ledger.

Definition at line 556 of file Node.cpp.

◆ getHashesByIndex() [2/2]

std::map< LedgerIndex, LedgerHashPair > xrpl::detail::getHashesByIndex ( soci::session & session,
LedgerIndex minSeq,
LedgerIndex maxSeq,
beast::Journal j )

getHashesByIndex Returns hash of the ledger and hash of parent ledger for all ledgers with sequences from given minimum limit to given maximum limit.

Parameters
sessionSession with database.
minSeqMinimum ledger sequence.
maxSeqMaximum ledger sequence.
jJournal.
Returns
Map which points sequence number of found ledger to the struct LedgerHashPair which contains ledger hash and its parent hash.

Definition at line 584 of file Node.cpp.

◆ getTxHistory()

std::pair< std::vector< std::shared_ptr< Transaction > >, int > xrpl::detail::getTxHistory ( soci::session & session,
Application & app,
LedgerIndex startIndex,
int quantity )

getTxHistory Returns given number of most recent transactions starting from given number of entry.

Parameters
sessionSession with database.
appApplication object.
startIndexOffset of first returned entry.
quantityNumber of returned entries.
Returns
Vector of shared pointers to transactions sorted in descending order by ledger sequence. Also number of transactions if count == true.

Definition at line 620 of file Node.cpp.

◆ transactionsSQL()

std::string xrpl::detail::transactionsSQL ( Application & app,
std::string selection,
RelationalDatabase::AccountTxOptions const & options,
bool descending,
bool binary,
bool count,
beast::Journal j )
static

transactionsSQL Returns a SQL query for selecting the oldest or newest transactions in decoded or binary form for the account that matches the given criteria starting from the provided offset.

Parameters
appApplication object.
selectionList of table fields to select from the database.
optionsStruct AccountTxOptions which contains the criteria to match: the account, the ledger search range, the offset of the first entry to return, the number of transactions to return, and a flag if this number is unlimited.
descendingTrue for descending order, false for ascending.
binaryTrue for binary form, false for decoded.
countTrue for counting the number of transactions, false for selecting them.
jJournal.
Returns
SQL query string.

Definition at line 686 of file Node.cpp.

◆ getAccountTxs()

std::pair< RelationalDatabase::AccountTxs, int > xrpl::detail::getAccountTxs ( soci::session & session,
Application & app,
LedgerMaster & ledgerMaster,
RelationalDatabase::AccountTxOptions const & options,
bool descending,
beast::Journal j )
static

getAccountTxs Returns the oldest or newest transactions for the account that matches the given criteria starting from the provided offset.

Parameters
sessionSession with the database.
appApplication object.
ledgerMasterLedgerMaster object.
optionsStruct AccountTxOptions which contains the criteria to match: the account, the ledger search range, the offset of the first entry to return, the number of transactions to return, and a flag if this number is unlimited.
descendingTrue for descending order, false for ascending.
jJournal.
Returns
Vector of pairs of found transactions and their metadata sorted by account sequence in the specified order along with the number of transactions processed or skipped. If this number is >= 0, then it represents the number of transactions processed, if it is < 0, then -number represents the number of transactions skipped. We need to skip some number of transactions if option offset is > 0 in the options structure.

Definition at line 785 of file Node.cpp.

◆ getOldestAccountTxs()

std::pair< RelationalDatabase::AccountTxs, int > xrpl::detail::getOldestAccountTxs ( soci::session & session,
Application & app,
LedgerMaster & ledgerMaster,
RelationalDatabase::AccountTxOptions const & options,
beast::Journal j )

getOldestAccountTxs Returns oldest transactions for given account which match given criteria starting from given offset.

Parameters
sessionSession with database.
appApplication object.
ledgerMasterLedgerMaster object.
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
jJournal.
Returns
Vector of pairs of found transactions and their metadata sorted in ascending order by account sequence. Also number of transactions processed or skipped. If this number is >= 0, then it means number of transactions processed, if it is < 0, then -number means number of transactions skipped. We need to skip some quantity of transactions if option offset is > 0 in the options structure.

Definition at line 868 of file Node.cpp.

◆ getNewestAccountTxs()

std::pair< RelationalDatabase::AccountTxs, int > xrpl::detail::getNewestAccountTxs ( soci::session & session,
Application & app,
LedgerMaster & ledgerMaster,
RelationalDatabase::AccountTxOptions const & options,
beast::Journal j )

getNewestAccountTxs Returns newest transactions for given account which match given criteria starting from given offset.

Parameters
sessionSession with database.
appApplication object.
ledgerMasterLedgerMaster object.
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
jJournal.
Returns
Vector of pairs of found transactions and their metadata sorted in descending order by account sequence. Also number of transactions processed or skipped. If this number is >= 0, then it means number of transactions processed, if it is < 0, then -number means number of transactions skipped. We need to skip some quantity of transactions if option offset is > 0 in the options structure.

Definition at line 879 of file Node.cpp.

◆ getAccountTxsB()

std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > xrpl::detail::getAccountTxsB ( soci::session & session,
Application & app,
RelationalDatabase::AccountTxOptions const & options,
bool descending,
beast::Journal j )
static

getAccountTxsB Returns the oldest or newest transactions in binary form for the account that matches given criteria starting from the provided offset.

Parameters
sessionSession with the database.
appApplication object.
optionsStruct AccountTxOptions which contains the criteria to match: the account, the ledger search range, the offset of the first entry to return, the number of transactions to return, and a flag if this number is unlimited.
descendingTrue for descending order, false for ascending.
jJournal.
Returns
Vector of tuples each containing (the found transactions, their metadata, and their account sequences) sorted by account sequence in the specified order along with the number of transactions processed or skipped. If this number is >= 0, then it represents the number of transactions processed, if it is < 0, then -number represents the number of transactions skipped. We need to skip some number of transactions if option offset is > 0 in the options structure.

Definition at line 910 of file Node.cpp.

◆ getOldestAccountTxsB()

std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > xrpl::detail::getOldestAccountTxsB ( soci::session & session,
Application & app,
RelationalDatabase::AccountTxOptions const & options,
beast::Journal j )

getOldestAccountTxsB Returns oldest transactions in binary form for given account which match given criteria starting from given offset.

Parameters
sessionSession with database.
appApplication object.
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
jJournal.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in ascending order by account sequence. Also number of transactions processed or skipped. If this number is >= 0, then it means number of transactions processed, if it is < 0, then -number means number of transactions skipped. We need to skip some quantity of transactions if option offset is > 0 in the options structure.

Definition at line 967 of file Node.cpp.

◆ getNewestAccountTxsB()

std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > xrpl::detail::getNewestAccountTxsB ( soci::session & session,
Application & app,
RelationalDatabase::AccountTxOptions const & options,
beast::Journal j )

getNewestAccountTxsB Returns newest transactions in binary form for given account which match given criteria starting from given offset.

Parameters
sessionSession with database.
appApplication object.
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
jJournal.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in descending order by account sequence. Also number of transactions processed or skipped. If this number is >= 0, then it means number of transactions processed, if it is < 0, then -number means number of transactions skipped. We need to skip some quantity of transactions if option offset is > 0 in the options structure.

Definition at line 977 of file Node.cpp.

◆ accountTxPage()

std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > xrpl::detail::accountTxPage ( soci::session & session,
std::function< void(std::uint32_t)> const & onUnsavedLedger,
std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const & onTransaction,
RelationalDatabase::AccountTxPageOptions const & options,
std::uint32_t pageLength,
bool forward )
static

accountTxPage Searches for the oldest or newest transactions for the account that matches the given criteria starting from the provided marker and invokes the callback parameter for each found transaction.

Parameters
sessionSession with the database.
onUnsavedLedgerCallback function to call on each found unsaved ledger within the given range.
onTransactionCallback function to call on each found transaction.
optionsStruct AccountTxPageOptions which contains the criteria to match: the account, the ledger search range, the marker of the first returned entry, the number of transactions to return, and a flag if this number unlimited.
pageLengthTotal number of transactions to return.
forwardTrue for ascending order, false for descending.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in the specified order by account sequence, a marker for the next search if the search was not finished and the number of transactions processed during this call.

Definition at line 1006 of file Node.cpp.

◆ oldestAccountTxPage()

std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > xrpl::detail::oldestAccountTxPage ( soci::session & session,
std::function< void(std::uint32_t)> const & onUnsavedLedger,
std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const & onTransaction,
RelationalDatabase::AccountTxPageOptions const & options,
std::uint32_t pageLength )

oldestAccountTxPage Searches oldest transactions for given account which match given criteria starting from given marker and calls callback for each found transaction.

Parameters
sessionSession with database.
onUnsavedLedgerCallback function to call on each found unsaved ledger within given range.
onTransactionCallback function to call on each found transaction.
optionsStruct AccountTxPageOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, marker of first returned entry, number of transactions to return, flag if this number unlimited.
pageLengthTotal number of transactions to return.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in ascending order by account sequence and marker for next search if search not finished. Also number of transactions processed during this call.

Definition at line 1165 of file Node.cpp.

◆ newestAccountTxPage()

std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > xrpl::detail::newestAccountTxPage ( soci::session & session,
std::function< void(std::uint32_t)> const & onUnsavedLedger,
std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const & onTransaction,
RelationalDatabase::AccountTxPageOptions const & options,
std::uint32_t pageLength )

newestAccountTxPage Searches newest transactions for given account which match given criteria starting from given marker and calls callback for each found transaction.

Parameters
sessionSession with database.
onUnsavedLedgerCallback function to call on each found unsaved ledger within given range.
onTransactionCallback function to call on each found transaction.
optionsStruct AccountTxPageOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, marker of first returned entry, number of transactions to return, flag if this number unlimited.
pageLengthTotal number of transactions to return.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in descending order by account sequence and marker for next search if search not finished. Also number of transactions processed during this call.

Definition at line 1176 of file Node.cpp.

◆ getTransaction()

std::variant< RelationalDatabase::AccountTx, TxSearched > xrpl::detail::getTransaction ( soci::session & session,
Application & app,
uint256 const & id,
std::optional< ClosedInterval< uint32_t > > const & range,
ErrorCodeI & ec )

getTransaction Returns transaction with given hash.

If not found and range given then check if all ledgers from the range are present in the database.

Parameters
sessionSession with database.
appApplication object.
idHash of the transaction.
rangeRange of ledgers to check, if present.
ecDefault value of error code.
Returns
Transaction and its metadata if found, TxSearched::All if range given and all ledgers from range are present in the database, TxSearched::Some if range given and not all ledgers are present, TxSearched::Unknown if range not given or deserializing error occurred. In the last case error code modified in ec link parameter, in other cases default error code remained.

Definition at line 1187 of file Node.cpp.

◆ dbHasSpace()

bool xrpl::detail::dbHasSpace ( soci::session & session,
Config const & config,
beast::Journal j )

dbHasSpace Checks if given database has available space.

Parameters
sessionSession with database.
configConfig object.
jJournal.
Returns
True if space is available.

Definition at line 1263 of file Node.cpp.

◆ buffersBegin()

template<typename BufferSequence>
auto xrpl::detail::buffersBegin ( BufferSequence const & bufs)

Definition at line 124 of file ProtocolMessage.h.

◆ buffersEnd()

template<typename BufferSequence>
auto xrpl::detail::buffersEnd ( BufferSequence const & bufs)

Definition at line 131 of file ProtocolMessage.h.

◆ parseMessageHeader()

template<class BufferSequence>
std::optional< MessageHeader > xrpl::detail::parseMessageHeader ( boost::system::error_code & ec,
BufferSequence const & bufs,
std::size_t size )

Parse a message header.

Returns
a seated optional if the message header was successfully parsed. An unseated optional otherwise, in which case
Parameters
eccontains more information:
  • set to errc::success if not enough bytes were present
  • set to errc::no_message if a valid header was not present @bufs - sequence of input buffers, can't be empty @size input data size

Definition at line 147 of file ProtocolMessage.h.

◆ parseMessageContent()

template<class T, class Buffers, class = std::enable_if_t<std::is_base_of_v<::google::protobuf::Message, T>>>
std::shared_ptr< T > xrpl::detail::parseMessageContent ( MessageHeader const & header,
Buffers const & buffers )

Definition at line 238 of file ProtocolMessage.h.

◆ invoke()

template<class T, class Buffers, class Handler, class = std::enable_if_t<std::is_base_of_v<::google::protobuf::Message, T>>>
bool xrpl::detail::invoke ( MessageHeader const & header,
Buffers const & buffers,
Handler & handler )

Definition at line 274 of file ProtocolMessage.h.

◆ getTrustLineItems()

template<class T>
std::vector< T > xrpl::detail::getTrustLineItems ( AccountID const & accountID,
ReadView const & view,
LineDirection direction = LineDirection::Outgoing )

Definition at line 49 of file TrustLine.cpp.

◆ getDefinitions()

ServerDefinitions const & xrpl::detail::getDefinitions ( )

Definition at line 370 of file ServerDefinitions.cpp.

Variable Documentation

◆ kInt64Digits

std::size_t xrpl::detail::kInt64Digits = 20
constexpr

Builds a table of the powers of 10.

This function is marked consteval, so it can only be run in a constexpr context. This assures that it is and can only be run at compile time. Doing it at runtime would be pretty wasteful and inefficient.

Definition at line 54 of file Number.h.

◆ kDigitLookupTable

std::array<std::optional<int>, 256> const xrpl::detail::kDigitLookupTable
constexpr
Initial value:
= []() {
for (int i = 0; i < 10; ++i)
t['0' + i] = i;
for (int i = 0; i < 6; ++i)
{
t['A' + i] = 10 + i;
t['a' + i] = 10 + i;
}
return t;
}()

Definition at line 38 of file StringUtilities.h.

◆ gDefaultObject

DefaultObjectT xrpl::detail::gDefaultObject

Definition at line 28 of file STVar.cpp.

◆ gNonPresentObject

NonPresentObjectT xrpl::detail::gNonPresentObject

Definition at line 29 of file STVar.cpp.

◆ kNumFeatures

std::size_t xrpl::detail::kNumFeatures
staticconstexpr
Initial value:
=
(0 +
)

Definition at line 139 of file Feature.h.

◆ kIsIntegralConstant

template<typename T>
bool xrpl::detail::kIsIntegralConstant = false
constexpr

Definition at line 18 of file MultiApiJson.h.

◆ kIsIntegralConstant< std::integral_constant< I, A > & >

template<typename I, auto A>
bool xrpl::detail::kIsIntegralConstant< std::integral_constant< I, A > & > = true
constexpr

Definition at line 20 of file MultiApiJson.h.

◆ kIsIntegralConstant< std::integral_constant< I, A > const & >

template<typename I, auto A>
bool xrpl::detail::kIsIntegralConstant< std::integral_constant< I, A > const & > = true
constexpr

Definition at line 22 of file MultiApiJson.h.

◆ kIsoCharSet

std::string_view xrpl::detail::kIsoCharSet
constexpr
Initial value:
=
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789"
"<>(){}[]|?!@#$%^&*"

Definition at line 21 of file UintTypes.cpp.

◆ kIsoCodeOffset

std::size_t xrpl::detail::kIsoCodeOffset = 12
constexpr

Definition at line 28 of file UintTypes.cpp.

◆ kIsoCodeLength

std::size_t xrpl::detail::kIsoCodeLength = 3
constexpr

Definition at line 31 of file UintTypes.cpp.

◆ kDefaultExpires

auto xrpl::detail::kDefaultExpires = std::chrono::seconds{3600}
constexpr

Definition at line 41 of file ValidatorSite_test.cpp.

◆ kDefaultEffectiveOverlap

auto xrpl::detail::kDefaultEffectiveOverlap = std::chrono::seconds{30}
constexpr

Definition at line 42 of file ValidatorSite_test.cpp.

◆ kTableTypeCount

int xrpl::detail::kTableTypeCount = 3
constexpr

Definition at line 12 of file Node.h.