|
| TxQ (Setup const &setup, beast::Journal j) |
| Constructor. More...
|
|
virtual | ~TxQ () |
| Destructor. More...
|
|
std::pair< TER, bool > | apply (Application &app, OpenView &view, std::shared_ptr< STTx const > const &tx, ApplyFlags flags, beast::Journal j) |
| Add a new transaction to the open ledger, hold it in the queue, or reject it. More...
|
|
bool | accept (Application &app, OpenView &view) |
| Fill the new open ledger with transactions from the queue. More...
|
|
void | processClosedLedger (Application &app, ReadView const &view, bool timeLeap) |
| Update fee metrics and clean up the queue in preparation for the next ledger. More...
|
|
SeqProxy | nextQueuableSeq (std::shared_ptr< SLE const > const &sleAccount) const |
| Return the next sequence that would go in the TxQ for an account. More...
|
|
Metrics | getMetrics (OpenView const &view) const |
| Returns fee metrics in reference fee level units. More...
|
|
FeeAndSeq | getTxRequiredFeeAndSeq (OpenView const &view, std::shared_ptr< STTx const > const &tx) const |
| Returns minimum required fee for tx and two sequences: first vaild sequence for this account in current ledger and first available sequence for transaction. More...
|
|
std::vector< TxDetails > | getAccountTxs (AccountID const &account) const |
| Returns information about the transactions currently in the queue for the account. More...
|
|
std::vector< TxDetails > | getTxs () const |
| Returns information about all transactions currently in the queue. More...
|
|
Json::Value | doRPC (Application &app) const |
| Summarize current fee metrics for the fee RPC command. More...
|
|
|
SeqProxy | nextQueuableSeqImpl (std::shared_ptr< SLE const > const &sleAccount, std::lock_guard< std::mutex > const &) const |
|
FeeLevel64 | getRequiredFeeLevel (OpenView &view, ApplyFlags flags, FeeMetrics::Snapshot const &metricsSnapshot, std::lock_guard< std::mutex > const &lock) const |
|
std::optional< std::pair< TER, bool > > | tryDirectApply (Application &app, OpenView &view, std::shared_ptr< STTx const > const &tx, ApplyFlags flags, beast::Journal j) |
|
std::optional< TxQAccount::TxMap::iterator > | removeFromByFee (std::optional< TxQAccount::TxMap::iterator > const &replacedTxIter, std::shared_ptr< STTx const > const &tx) |
|
template<size_t fillPercentage = 100> |
bool | isFull () const |
| Is the queue at least fillPercentage full? More...
|
|
TER | canBeHeld (STTx const &, ApplyFlags const, OpenView const &, std::shared_ptr< SLE const > const &sleAccount, AccountMap::iterator const &, std::optional< TxQAccount::TxMap::iterator > const &, std::lock_guard< std::mutex > const &lock) |
| Checks if the indicated transaction fits the conditions for being stored in the queue. More...
|
|
FeeMultiSet::iterator_type | erase (FeeMultiSet::const_iterator_type) |
| Erase and return the next entry in byFee_ (lower fee level) More...
|
|
FeeMultiSet::iterator_type | eraseAndAdvance (FeeMultiSet::const_iterator_type) |
| Erase and return the next entry for the account (if fee level is higher), or next entry in byFee_ (lower fee level). More...
|
|
TxQAccount::TxMap::iterator | erase (TxQAccount &txQAccount, TxQAccount::TxMap::const_iterator begin, TxQAccount::TxMap::const_iterator end) |
| Erase a range of items, based on TxQAccount::TxMap iterators. More...
|
|
std::pair< TER, bool > | tryClearAccountQueueUpThruTx (Application &app, OpenView &view, STTx const &tx, AccountMap::iterator const &accountIter, TxQAccount::TxMap::iterator, FeeLevel64 feeLevelPaid, PreflightResult const &pfresult, std::size_t const txExtraCount, ApplyFlags flags, FeeMetrics::Snapshot const &metricsSnapshot, beast::Journal j) |
| All-or-nothing attempt to try to apply the queued txs for accountIter up to and including tx . More...
|
|
Transaction Queue.
Used to manage transactions in conjunction with fee escalation.
Once enough transactions are added to the open ledger, the required fee will jump dramatically. If additional transactions are added, the fee will grow exponentially from there.
Transactions that don't have a high enough fee to be applied to the ledger are added to the queue in order from highest fee level to lowest. Whenever a new ledger is accepted as validated, transactions are first applied from the queue to the open ledger in fee level order until either all transactions are applied or the fee again jumps too high for the remaining transactions.
For further information and a high-level overview of how transactions are processed with the TxQ
, see FeeEscalation.md
Definition at line 57 of file TxQ.h.