xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
xrpld
app
ledger
InboundTransactions.h
1
#pragma once
2
3
#include <xrpld/overlay/Peer.h>
4
5
#include <xrpl/basics/base_uint.h>
6
#include <xrpl/beast/clock/abstract_clock.h>
7
#include <xrpl/beast/insight/Collector.h>
8
#include <xrpl/shamap/SHAMap.h>
9
10
#include <xrpl.pb.h>
11
12
#include <
chrono
>
13
#include <
cstdint
>
14
#include <
functional
>
15
#include <
memory
>
16
17
namespace
xrpl
{
18
19
class
Application
;
20
24
25
class
InboundTransactions
26
{
27
public
:
28
using
ClockType
=
beast::AbstractClock<std::chrono::steady_clock>
;
29
30
InboundTransactions
() =
default
;
31
InboundTransactions
(
InboundTransactions
const
&) =
delete
;
32
InboundTransactions
&
33
operator=
(
InboundTransactions
const
&) =
delete
;
34
35
virtual
~InboundTransactions
() = 0;
36
46
virtual
std::shared_ptr<SHAMap>
47
getSet
(
UInt256
const
& setHash,
bool
acquire) = 0;
48
56
virtual
void
57
gotData
(
58
UInt256
const
& setHash,
59
std::shared_ptr<Peer>
peer,
60
std::shared_ptr<protocol::TMLedgerData>
message) = 0;
61
70
virtual
void
71
giveSet
(
UInt256
const
& setHash,
std::shared_ptr<SHAMap>
const
&
set
,
bool
acquired) = 0;
72
76
virtual
void
77
newRound
(
std::uint32_t
seq) = 0;
78
79
virtual
void
80
stop
() = 0;
81
};
82
83
std::unique_ptr<InboundTransactions>
84
makeInboundTransactions
(
85
Application
& app,
86
beast::insight::Collector::Ptr
const
& collector,
87
std::function
<
void
(
std::shared_ptr<SHAMap>
const
&,
bool
)> gotSet);
88
89
}
// namespace xrpl
chrono
beast::AbstractClock
Abstract interface to a clock.
Definition
abstract_clock.h:36
beast::insight::Collector::Ptr
std::shared_ptr< Collector > Ptr
Definition
Collector.h:29
xrpl::Application
Definition
Application.h:94
xrpl::InboundTransactions::InboundTransactions
InboundTransactions()=default
xrpl::InboundTransactions::InboundTransactions
InboundTransactions(InboundTransactions const &)=delete
xrpl::InboundTransactions::gotData
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.
xrpl::InboundTransactions::~InboundTransactions
virtual ~InboundTransactions()=0
xrpl::InboundTransactions::ClockType
beast::AbstractClock< std::chrono::steady_clock > ClockType
Definition
InboundTransactions.h:28
xrpl::InboundTransactions::getSet
virtual std::shared_ptr< SHAMap > getSet(UInt256 const &setHash, bool acquire)=0
Find and return a transaction set, or nullptr if it is missing.
xrpl::InboundTransactions::newRound
virtual void newRound(std::uint32_t seq)=0
Informs the container if a new consensus round.
xrpl::InboundTransactions::operator=
InboundTransactions & operator=(InboundTransactions const &)=delete
xrpl::InboundTransactions::stop
virtual void stop()=0
xrpl::InboundTransactions::giveSet
virtual void giveSet(UInt256 const &setHash, std::shared_ptr< SHAMap > const &set, bool acquired)=0
Add a transaction set.
cstdint
std::function
functional
std::uint32_t
memory
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::set
bool set(T &target, std::string const &name, Section const §ion)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
Definition
BasicConfig.h:320
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::makeInboundTransactions
std::unique_ptr< InboundTransactions > makeInboundTransactions(Application &app, beast::insight::Collector::Ptr const &collector, std::function< void(std::shared_ptr< SHAMap > const &, bool)> gotSet)
Definition
InboundTransactions.cpp:275
std::shared_ptr
std::unique_ptr
Generated by
1.17.0