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

Public Member Functions

 TxQApplyImpl (TxQ &txq, Application &app, OpenView &view, std::shared_ptr< STTx const > const &tx, ApplyFlags flags, beast::Journal j)
ApplyResult apply ()

Private Types

using TxMapCIter = TxQ::TxQAccount::TxMap::const_iterator
using TxMapIter = TxQ::TxQAccount::TxMap::iterator
using TxRange = std::pair<TxMapIter, TxMapIter>
using AccMapIter = TxQ::AccountMap::iterator

Private Member Functions

std::optional< ApplyResult > applyImplPrelock ()
ApplyResult applyImpl ()
void retrievePrevTxs ()
std::optional< ApplyResult > checkTicketInLedger () const
std::optional< ApplyResult > checkIsTxBlocker () const
void retrieveTxToReplace ()
std::optional< ApplyResult > checkFeeLevel () const
std::optional< ApplyResult > checkBlockerInAccQue () const
std::expected< bool, ApplyResult > checkMultiTxn () const
std::optional< ApplyResult > processAccountTxs ()
std::optional< ApplyResult > checkFrontTx (TxMapCIter const &prevIter, TxMapCIter const &endIter) const
std::pair< XRPAmount, XRPAmount > calcSpendAndFee () const
std::optional< ApplyResult > tryClearAccountQueueUpThruTx ()
std::optional< ApplyResult > canBeHeld () const
std::optional< ApplyResult > processQueueIsFull ()
void addTxToQueue ()

Private Attributes

TxQ & txq_
std::optional< std::reference_wrapper< std::scoped_lock< std::mutex > const > > txqLock_
Application & app_
OpenView & view_
ApplyFlags flags_
beast::Journal j_
beast::Journal jExt_
std::shared_ptr< STTx const > const & tx_
AccountID const accID_
Keylet const accKey_
SLE::const_pointer accSle_
SeqProxy accSeq_ = SeqProxy(SeqProxy::Type::Seq, 0)
uint256 const txID_
SeqProxy const txSeq_
PreflightResult const preflightRes_
std::optional< TxQ::FeeMetrics::Snapshot > metricsSnapshot_
FeeLevel64 feeLevelPaid_ {}
FeeLevel64 requiredFeeLevel_ {}
std::optional< TxRange > prevTxs_
std::uint32_t accTxCount_ = 0
AccMapIter byAccountIter_
std::optional< TxMapCIter > txToReplaceIter_
std::optional< MultiTxn > multiTxn_

Detailed Description

Definition at line 124 of file TxQ.cpp.

Member Typedef Documentation

◆ TxMapCIter

using xrpl::TxQApplyImpl::TxMapCIter = TxQ::TxQAccount::TxMap::const_iterator
private

Definition at line 126 of file TxQ.cpp.

◆ TxMapIter

using xrpl::TxQApplyImpl::TxMapIter = TxQ::TxQAccount::TxMap::iterator
private

Definition at line 127 of file TxQ.cpp.

◆ TxRange

Definition at line 128 of file TxQ.cpp.

◆ AccMapIter

using xrpl::TxQApplyImpl::AccMapIter = TxQ::AccountMap::iterator
private

Definition at line 129 of file TxQ.cpp.

Constructor & Destructor Documentation

◆ TxQApplyImpl()

xrpl::TxQApplyImpl::TxQApplyImpl ( TxQ & txq,
Application & app,
OpenView & view,
std::shared_ptr< STTx const > const & tx,
ApplyFlags flags,
beast::Journal j )

Definition at line 175 of file TxQ.cpp.

Member Function Documentation

◆ apply()

ApplyResult xrpl::TxQApplyImpl::apply ( )

Definition at line 1481 of file TxQ.cpp.

◆ applyImplPrelock()

std::optional< ApplyResult > xrpl::TxQApplyImpl::applyImplPrelock ( )
private

Definition at line 1498 of file TxQ.cpp.

◆ applyImpl()

ApplyResult xrpl::TxQApplyImpl::applyImpl ( )
private

Definition at line 1529 of file TxQ.cpp.

◆ retrievePrevTxs()

void xrpl::TxQApplyImpl::retrievePrevTxs ( )
private

Definition at line 274 of file TxQ.cpp.

◆ checkTicketInLedger()

std::optional< ApplyResult > xrpl::TxQApplyImpl::checkTicketInLedger ( ) const
private

Definition at line 254 of file TxQ.cpp.

◆ checkIsTxBlocker()

std::optional< ApplyResult > xrpl::TxQApplyImpl::checkIsTxBlocker ( ) const
private

Definition at line 294 of file TxQ.cpp.

◆ retrieveTxToReplace()

void xrpl::TxQApplyImpl::retrieveTxToReplace ( )
private

Definition at line 321 of file TxQ.cpp.

◆ checkFeeLevel()

std::optional< ApplyResult > xrpl::TxQApplyImpl::checkFeeLevel ( ) const
private

Definition at line 332 of file TxQ.cpp.

◆ checkBlockerInAccQue()

std::optional< ApplyResult > xrpl::TxQApplyImpl::checkBlockerInAccQue ( ) const
private

Definition at line 368 of file TxQ.cpp.

◆ checkMultiTxn()

std::expected< bool, ApplyResult > xrpl::TxQApplyImpl::checkMultiTxn ( ) const
private

Definition at line 396 of file TxQ.cpp.

◆ processAccountTxs()

std::optional< ApplyResult > xrpl::TxQApplyImpl::processAccountTxs ( )
private

Definition at line 506 of file TxQ.cpp.

◆ checkFrontTx()

std::optional< ApplyResult > xrpl::TxQApplyImpl::checkFrontTx ( TxMapCIter const & prevIter,
TxMapCIter const & endIter ) const
private

Definition at line 426 of file TxQ.cpp.

◆ calcSpendAndFee()

std::pair< XRPAmount, XRPAmount > xrpl::TxQApplyImpl::calcSpendAndFee ( ) const
private

Definition at line 466 of file TxQ.cpp.

◆ tryClearAccountQueueUpThruTx()

std::optional< ApplyResult > xrpl::TxQApplyImpl::tryClearAccountQueueUpThruTx ( )
private

Definition at line 638 of file TxQ.cpp.

◆ canBeHeld()

std::optional< ApplyResult > xrpl::TxQApplyImpl::canBeHeld ( ) const
private

Definition at line 693 of file TxQ.cpp.

◆ processQueueIsFull()

std::optional< ApplyResult > xrpl::TxQApplyImpl::processQueueIsFull ( )
private

Definition at line 715 of file TxQ.cpp.

◆ addTxToQueue()

void xrpl::TxQApplyImpl::addTxToQueue ( )
private

Definition at line 787 of file TxQ.cpp.

Member Data Documentation

◆ txq_

TxQ& xrpl::TxQApplyImpl::txq_
private

Definition at line 131 of file TxQ.cpp.

◆ txqLock_

std::optional<std::reference_wrapper<std::scoped_lock<std::mutex> const> > xrpl::TxQApplyImpl::txqLock_
private

Definition at line 132 of file TxQ.cpp.

◆ app_

Application& xrpl::TxQApplyImpl::app_
private

Definition at line 134 of file TxQ.cpp.

◆ view_

OpenView& xrpl::TxQApplyImpl::view_
private

Definition at line 135 of file TxQ.cpp.

◆ flags_

ApplyFlags xrpl::TxQApplyImpl::flags_
private

Definition at line 136 of file TxQ.cpp.

◆ j_

beast::Journal xrpl::TxQApplyImpl::j_
private

Definition at line 138 of file TxQ.cpp.

◆ jExt_

beast::Journal xrpl::TxQApplyImpl::jExt_
private

Definition at line 140 of file TxQ.cpp.

◆ tx_

std::shared_ptr<STTx const> const& xrpl::TxQApplyImpl::tx_
private

Definition at line 141 of file TxQ.cpp.

◆ accID_

AccountID const xrpl::TxQApplyImpl::accID_
private

Definition at line 143 of file TxQ.cpp.

◆ accKey_

Keylet const xrpl::TxQApplyImpl::accKey_
private

Definition at line 144 of file TxQ.cpp.

◆ accSle_

SLE::const_pointer xrpl::TxQApplyImpl::accSle_
private

Definition at line 145 of file TxQ.cpp.

◆ accSeq_

SeqProxy xrpl::TxQApplyImpl::accSeq_ = SeqProxy(SeqProxy::Type::Seq, 0)
private

Definition at line 146 of file TxQ.cpp.

◆ txID_

uint256 const xrpl::TxQApplyImpl::txID_
private

Definition at line 148 of file TxQ.cpp.

◆ txSeq_

SeqProxy const xrpl::TxQApplyImpl::txSeq_
private

Definition at line 149 of file TxQ.cpp.

◆ preflightRes_

PreflightResult const xrpl::TxQApplyImpl::preflightRes_
private

Definition at line 150 of file TxQ.cpp.

◆ metricsSnapshot_

std::optional<TxQ::FeeMetrics::Snapshot> xrpl::TxQApplyImpl::metricsSnapshot_
private

Definition at line 152 of file TxQ.cpp.

◆ feeLevelPaid_

FeeLevel64 xrpl::TxQApplyImpl::feeLevelPaid_ {}
private

Definition at line 153 of file TxQ.cpp.

◆ requiredFeeLevel_

FeeLevel64 xrpl::TxQApplyImpl::requiredFeeLevel_ {}
private

Definition at line 154 of file TxQ.cpp.

◆ prevTxs_

std::optional<TxRange> xrpl::TxQApplyImpl::prevTxs_
private

Definition at line 158 of file TxQ.cpp.

◆ accTxCount_

std::uint32_t xrpl::TxQApplyImpl::accTxCount_ = 0
private

Definition at line 160 of file TxQ.cpp.

◆ byAccountIter_

AccMapIter xrpl::TxQApplyImpl::byAccountIter_
private

Definition at line 164 of file TxQ.cpp.

◆ txToReplaceIter_

std::optional<TxMapCIter> xrpl::TxQApplyImpl::txToReplaceIter_
private

Definition at line 167 of file TxQ.cpp.

◆ multiTxn_

std::optional<MultiTxn> xrpl::TxQApplyImpl::multiTxn_
private

Definition at line 170 of file TxQ.cpp.