xrpld
Loading...
Searching...
No Matches
xrpl::InboundTransactions Class Referenceabstract

Manages the acquisition and lifetime of transaction sets. More...

#include <InboundTransactions.h>

Inheritance diagram for xrpl::InboundTransactions:

Public Types

using clock_type = beast::AbstractClock<std::chrono::steady_clock>

Public Member Functions

 InboundTransactions ()=default
 InboundTransactions (InboundTransactions const &)=delete
InboundTransactionsoperator= (InboundTransactions const &)=delete
virtual ~InboundTransactions ()=0
virtual std::shared_ptr< SHAMapgetSet (uint256 const &setHash, bool acquire)=0
 Find and return a transaction set, or nullptr if it is missing.
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.
virtual void giveSet (uint256 const &setHash, std::shared_ptr< SHAMap > const &set, bool acquired)=0
 Add a transaction set.
virtual void newRound (std::uint32_t seq)=0
 Informs the container if a new consensus round.
virtual void stop ()=0

Detailed Description

Manages the acquisition and lifetime of transaction sets.

Definition at line 17 of file InboundTransactions.h.

Member Typedef Documentation

◆ clock_type

Constructor & Destructor Documentation

◆ InboundTransactions() [1/2]

xrpl::InboundTransactions::InboundTransactions ( )
default

◆ InboundTransactions() [2/2]

xrpl::InboundTransactions::InboundTransactions ( InboundTransactions const & )
delete

◆ ~InboundTransactions()

xrpl::InboundTransactions::~InboundTransactions ( )
pure virtualdefault

Member Function Documentation

◆ operator=()

InboundTransactions & xrpl::InboundTransactions::operator= ( InboundTransactions const & )
delete

◆ getSet()

virtual std::shared_ptr< SHAMap > xrpl::InboundTransactions::getSet ( uint256 const & setHash,
bool acquire )
pure virtual

Find and return a transaction set, or nullptr if it is missing.

Parameters
setHashThe transaction set ID (digest of the SHAMap root node).
acquireWhether to fetch the transaction set from the network if it is missing.
Returns
The transaction set with ID setHash, or nullptr if it is missing.

Implemented in xrpl::InboundTransactionsImp.

◆ gotData()

virtual void xrpl::InboundTransactions::gotData ( uint256 const & setHash,
std::shared_ptr< Peer > peer,
std::shared_ptr< protocol::TMLedgerData > message )
pure virtual

Add a transaction set from a LedgerData message.

Parameters
setHashThe transaction set ID (digest of the SHAMap root node).
peerThe peer that sent the message.
messageThe LedgerData message.

◆ giveSet()

virtual void xrpl::InboundTransactions::giveSet ( uint256 const & setHash,
std::shared_ptr< SHAMap > const & set,
bool acquired )
pure virtual

Add a transaction set.

Parameters
setHashThe transaction set ID (should match set.getHash()).
setThe transaction set.
acquiredWhether this transaction set was acquired from a peer, or constructed by ourself during consensus.

Implemented in xrpl::InboundTransactionsImp.

◆ newRound()

virtual void xrpl::InboundTransactions::newRound ( std::uint32_t seq)
pure virtual

Informs the container if a new consensus round.

Implemented in xrpl::InboundTransactionsImp.

◆ stop()

virtual void xrpl::InboundTransactions::stop ( )
pure virtual