rippled
Loading...
Searching...
No Matches
TransactionMaster.h
1#pragma once
2
3#include <xrpld/app/misc/Transaction.h>
4
5#include <xrpl/basics/RangeSet.h>
6#include <xrpl/basics/TaggedCache.h>
7#include <xrpl/protocol/ErrorCodes.h>
8#include <xrpl/shamap/SHAMapItem.h>
9#include <xrpl/shamap/SHAMapTreeNode.h>
10
11namespace xrpl {
12
13class Application;
14class STTx;
15
16// Tracks all transactions in memory
17
19{
20public:
24 operator=(TransactionMaster const&) = delete;
25
28
30 fetch(uint256 const&, error_code_i& ec);
31
43
45 fetch(
46 boost::intrusive_ptr<SHAMapItem> const& item,
47 SHAMapNodeType type,
48 std::uint32_t uCommitLedger);
49
50 // return value: true = we had the transaction already
51 bool
53 uint256 const& hash,
54 std::uint32_t ledger,
57
58 void
60
61 void
62 sweep(void);
63
65 getCache();
66
67private:
70};
71
72} // namespace xrpl
Map/cache combination.
Definition TaggedCache.h:42
std::shared_ptr< Transaction > fetch_from_cache(uint256 const &)
TransactionMaster(TransactionMaster const &)=delete
bool inLedger(uint256 const &hash, std::uint32_t ledger, std::optional< uint32_t > tseq, std::optional< uint32_t > netID)
void canonicalize(std::shared_ptr< Transaction > *pTransaction)
std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > fetch(uint256 const &, error_code_i &ec)
TaggedCache< uint256, Transaction > & getCache()
TransactionMaster & operator=(TransactionMaster const &)=delete
TaggedCache< uint256, Transaction > mCache
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
Definition RangeSet.h:34
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
Definition RangeSet.h:25
TxSearched
Definition TxSearched.h:5
error_code_i
Definition ErrorCodes.h:20