rippled
Loading...
Searching...
No Matches
TransactionMaster.h
1#ifndef XRPL_APP_LEDGER_TRANSACTIONMASTER_H_INCLUDED
2#define XRPL_APP_LEDGER_TRANSACTIONMASTER_H_INCLUDED
3
4#include <xrpld/app/misc/Transaction.h>
5
6#include <xrpl/basics/RangeSet.h>
7#include <xrpl/basics/TaggedCache.h>
8#include <xrpl/protocol/ErrorCodes.h>
9#include <xrpl/shamap/SHAMapItem.h>
10#include <xrpl/shamap/SHAMapTreeNode.h>
11
12namespace ripple {
13
14class Application;
15class STTx;
16
17// Tracks all transactions in memory
18
20{
21public:
25 operator=(TransactionMaster const&) = delete;
26
29
33 fetch(uint256 const&, error_code_i& ec);
34
47 fetch(
48 uint256 const&,
50 error_code_i& ec);
51
53 fetch(
54 boost::intrusive_ptr<SHAMapItem> const& item,
55 SHAMapNodeType type,
56 std::uint32_t uCommitLedger);
57
58 // return value: true = we had the transaction already
59 bool
61 uint256 const& hash,
62 std::uint32_t ledger,
65
66 void
68
69 void
70 sweep(void);
71
73 getCache();
74
75private:
78};
79
80} // namespace ripple
81
82#endif
Map/cache combination.
Definition TaggedCache.h:43
std::shared_ptr< Transaction > fetch_from_cache(uint256 const &)
TransactionMaster(TransactionMaster const &)=delete
std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > fetch(uint256 const &, error_code_i &ec)
bool inLedger(uint256 const &hash, std::uint32_t ledger, std::optional< uint32_t > tseq, std::optional< uint32_t > netID)
TransactionMaster & operator=(TransactionMaster const &)=delete
TaggedCache< uint256, Transaction > mCache
void canonicalize(std::shared_ptr< Transaction > *pTransaction)
TaggedCache< uint256, Transaction > & getCache()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
Definition RangeSet.h:26
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
Definition RangeSet.h:35