rippled
Loading...
Searching...
No Matches
InboundTransactions.h
1#ifndef XRPL_APP_LEDGER_INBOUNDTRANSACTIONS_H_INCLUDED
2#define XRPL_APP_LEDGER_INBOUNDTRANSACTIONS_H_INCLUDED
3
4#include <xrpld/overlay/Peer.h>
5
6#include <xrpl/beast/clock/abstract_clock.h>
7#include <xrpl/shamap/SHAMap.h>
8
9#include <memory>
10
11namespace ripple {
12
13class Application;
14
19{
20public:
22
27
28 virtual ~InboundTransactions() = 0;
29
39 getSet(uint256 const& setHash, bool acquire) = 0;
40
47 virtual void
49 uint256 const& setHash,
52
60 virtual void
62 uint256 const& setHash,
63 std::shared_ptr<SHAMap> const& set,
64 bool acquired) = 0;
65
68 virtual void
70
71 virtual void
72 stop() = 0;
73};
74
77 Application& app,
78 beast::insight::Collector::ptr const& collector,
79 std::function<void(std::shared_ptr<SHAMap> const&, bool)> gotSet);
80
81} // namespace ripple
82
83#endif
Manages the acquisition and lifetime of transaction sets.
InboundTransactions(InboundTransactions const &)=delete
virtual void newRound(std::uint32_t seq)=0
Informs the container if a new consensus round.
virtual std::shared_ptr< SHAMap > getSet(uint256 const &setHash, bool acquire)=0
Find and return a transaction set, or nullptr if it is missing.
virtual void giveSet(uint256 const &setHash, std::shared_ptr< SHAMap > const &set, bool acquired)=0
Add a transaction set.
virtual void gotData(uint256 const &setHash, std::shared_ptr< Peer > peer, std::shared_ptr< protocol::TMLedgerData > message)=0
Add a transaction set from a LedgerData message.
InboundTransactions & operator=(InboundTransactions const &)=delete
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::unique_ptr< InboundTransactions > make_InboundTransactions(Application &app, beast::insight::Collector::ptr const &collector, std::function< void(std::shared_ptr< SHAMap > const &, bool)> gotSet)