rippled
Public Member Functions | Private Attributes | List of all members
ripple::TransactionMaster Class Reference
Collaboration diagram for ripple::TransactionMaster:
Collaboration graph
[legend]

Public Member Functions

 TransactionMaster (Application &app)
 
 TransactionMaster (TransactionMaster const &)=delete
 
TransactionMasteroperator= (TransactionMaster const &)=delete
 
std::shared_ptr< Transactionfetch_from_cache (uint256 const &)
 
std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearchedfetch (uint256 const &, error_code_i &ec)
 
std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearchedfetch (uint256 const &, ClosedInterval< uint32_t > const &range, error_code_i &ec)
 Fetch transaction from the cache or database. More...
 
std::shared_ptr< STTx const > fetch (boost::intrusive_ptr< SHAMapItem > const &item, SHAMapNodeType type, std::uint32_t uCommitLedger)
 
bool inLedger (uint256 const &hash, std::uint32_t ledger)
 
void canonicalize (std::shared_ptr< Transaction > *pTransaction)
 
void sweep (void)
 
TaggedCache< uint256, Transaction > & getCache ()
 

Private Attributes

ApplicationmApp
 
TaggedCache< uint256, TransactionmCache
 

Detailed Description

Definition at line 36 of file TransactionMaster.h.

Constructor & Destructor Documentation

◆ TransactionMaster() [1/2]

ripple::TransactionMaster::TransactionMaster ( Application app)

Definition at line 28 of file TransactionMaster.cpp.

◆ TransactionMaster() [2/2]

ripple::TransactionMaster::TransactionMaster ( TransactionMaster const &  )
delete

Member Function Documentation

◆ operator=()

TransactionMaster& ripple::TransactionMaster::operator= ( TransactionMaster const &  )
delete

◆ fetch_from_cache()

std::shared_ptr< Transaction > ripple::TransactionMaster::fetch_from_cache ( uint256 const &  txnID)

Definition at line 52 of file TransactionMaster.cpp.

◆ fetch() [1/3]

std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > ripple::TransactionMaster::fetch ( uint256 const &  txnID,
error_code_i ec 
)

Definition at line 60 of file TransactionMaster.cpp.

◆ fetch() [2/3]

std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > ripple::TransactionMaster::fetch ( uint256 const &  txnID,
ClosedInterval< uint32_t > const &  range,
error_code_i ec 
)

Fetch transaction from the cache or database.

Returns
A std::variant that contains either a pair of shared_pointer to the retrieved transaction and its metadata or an enum indicating whether or not the all ledgers in the provided range were present in the database while the search was conducted.

Definition at line 84 of file TransactionMaster.cpp.

◆ fetch() [3/3]

std::shared_ptr< STTx const > ripple::TransactionMaster::fetch ( boost::intrusive_ptr< SHAMapItem > const &  item,
SHAMapNodeType  type,
std::uint32_t  uCommitLedger 
)

Definition at line 109 of file TransactionMaster.cpp.

◆ inLedger()

bool ripple::TransactionMaster::inLedger ( uint256 const &  hash,
std::uint32_t  ledger 
)

Definition at line 40 of file TransactionMaster.cpp.

◆ canonicalize()

void ripple::TransactionMaster::canonicalize ( std::shared_ptr< Transaction > *  pTransaction)

Definition at line 143 of file TransactionMaster.cpp.

◆ sweep()

void ripple::TransactionMaster::sweep ( void  )

Definition at line 156 of file TransactionMaster.cpp.

◆ getCache()

TaggedCache< uint256, Transaction > & ripple::TransactionMaster::getCache ( )

Definition at line 162 of file TransactionMaster.cpp.

Member Data Documentation

◆ mApp

Application& ripple::TransactionMaster::mApp
private

Definition at line 89 of file TransactionMaster.h.

◆ mCache

TaggedCache<uint256, Transaction> ripple::TransactionMaster::mCache
private

Definition at line 90 of file TransactionMaster.h.