rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
xrpl::TxQ::TxQAccount Class Reference

Used to represent an account to the queue, and stores the transactions queued for that account by SeqProxy. More...

Collaboration diagram for xrpl::TxQ::TxQAccount:
Collaboration graph
[legend]

Public Types

using TxMap = std::map< SeqProxy, MaybeTx >
 

Public Member Functions

 TxQAccount (std::shared_ptr< STTx const > const &txn)
 Construct from a transaction.
 
 TxQAccount (AccountID const &account)
 Construct from an account.
 
std::size_t getTxnCount () const
 Return the number of transactions currently queued for this account.
 
bool empty () const
 Checks if this account has no transactions queued.
 
TxMap::const_iterator getPrevTx (SeqProxy seqProx) const
 Find the entry in transactions that precedes seqProx, if one does.
 
MaybeTxadd (MaybeTx &&)
 Add a transaction candidate to this account for queuing.
 
bool remove (SeqProxy seqProx)
 Remove the candidate with given SeqProxy value from this account.
 

Public Attributes

AccountID const account
 The account.
 
TxMap transactions
 Sequence number will be used as the key.
 
bool retryPenalty = false
 
bool dropPenalty = false
 

Detailed Description

Used to represent an account to the queue, and stores the transactions queued for that account by SeqProxy.

Definition at line 646 of file TxQ.h.

Member Typedef Documentation

◆ TxMap

Definition at line 649 of file TxQ.h.

Constructor & Destructor Documentation

◆ TxQAccount() [1/2]

xrpl::TxQ::TxQAccount::TxQAccount ( std::shared_ptr< STTx const > const &  txn)
explicit

Construct from a transaction.

Definition at line 302 of file TxQ.cpp.

◆ TxQAccount() [2/2]

xrpl::TxQ::TxQAccount::TxQAccount ( AccountID const &  account)
explicit

Construct from an account.

Definition at line 307 of file TxQ.cpp.

Member Function Documentation

◆ getTxnCount()

std::size_t xrpl::TxQ::TxQAccount::getTxnCount ( ) const

Return the number of transactions currently queued for this account.

Definition at line 678 of file TxQ.h.

◆ empty()

bool xrpl::TxQ::TxQAccount::empty ( ) const

Checks if this account has no transactions queued.

Definition at line 685 of file TxQ.h.

◆ getPrevTx()

TxQ::TxQAccount::TxMap::const_iterator xrpl::TxQ::TxQAccount::getPrevTx ( SeqProxy  seqProx) const

Find the entry in transactions that precedes seqProx, if one does.

Definition at line 312 of file TxQ.cpp.

◆ add()

TxQ::MaybeTx & xrpl::TxQ::TxQAccount::add ( MaybeTx &&  txn)

Add a transaction candidate to this account for queuing.

Definition at line 323 of file TxQ.cpp.

◆ remove()

bool xrpl::TxQ::TxQAccount::remove ( SeqProxy  seqProx)

Remove the candidate with given SeqProxy value from this account.

Returns
Whether a candidate was removed

Definition at line 338 of file TxQ.cpp.

Member Data Documentation

◆ account

AccountID const xrpl::TxQ::TxQAccount::account

The account.

Definition at line 652 of file TxQ.h.

◆ transactions

TxMap xrpl::TxQ::TxQAccount::transactions

Sequence number will be used as the key.

Definition at line 654 of file TxQ.h.

◆ retryPenalty

bool xrpl::TxQ::TxQAccount::retryPenalty = false

Definition at line 662 of file TxQ.h.

◆ dropPenalty

bool xrpl::TxQ::TxQAccount::dropPenalty = false

Definition at line 668 of file TxQ.h.