rippled
Public Types | Public Member Functions | List of all members
ripple::InboundTransactions Class Referenceabstract

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

Inheritance diagram for ripple::InboundTransactions:
Inheritance graph
[legend]

Public Types

using clock_type = beast::abstract_clock< 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. More...
 
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. More...
 
virtual void giveSet (uint256 const &setHash, std::shared_ptr< SHAMap > const &set, bool acquired)=0
 Add a transaction set. More...
 
virtual void newRound (std::uint32_t seq)=0
 Informs the container if a new consensus round. More...
 
virtual void stop ()=0
 

Detailed Description

Manages the acquisition and lifetime of transaction sets.

Definition at line 35 of file InboundTransactions.h.

Member Typedef Documentation

◆ clock_type

Definition at line 38 of file InboundTransactions.h.

Constructor & Destructor Documentation

◆ InboundTransactions() [1/2]

ripple::InboundTransactions::InboundTransactions ( )
default

◆ InboundTransactions() [2/2]

ripple::InboundTransactions::InboundTransactions ( InboundTransactions const &  )
delete

◆ ~InboundTransactions()

ripple::InboundTransactions::~InboundTransactions ( )
pure virtualdefault

Member Function Documentation

◆ operator=()

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

◆ getSet()

virtual std::shared_ptr<SHAMap> ripple::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 ripple::InboundTransactionsImp.

◆ gotData()

virtual void ripple::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.

Implemented in ripple::InboundTransactionsImp.

◆ giveSet()

virtual void ripple::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 ripple::InboundTransactionsImp.

◆ newRound()

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

Informs the container if a new consensus round.

Implemented in ripple::InboundTransactionsImp.

◆ stop()

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