xrpld
Loading...
Searching...
No Matches
xrpl::test::PeerPartial Class Referenceabstract

Simulate two entities - peer directly connected to the server (via squelch in PeerSim) and PeerImp (via Overlay). More...

Inheritance diagram for xrpl::test::PeerPartial:
Collaboration diagram for xrpl::test::PeerPartial:

Public Member Functions

 PeerPartial ()
 ~PeerPartial () override=default
virtual void onMessage (MessageSPtr const &m, SquelchCB f)=0
virtual void onMessage (protocol::TMSquelch const &squelch)=0
void send (protocol::TMSquelch const &squelch)
void send (std::shared_ptr< Message > const &m) override
beast::ip::Endpoint getRemoteAddress () const override
void charge (resource::Charge const &fee, std::string const &context={}) override
bool cluster () const override
bool isHighLatency () const override
int getScore (bool) const override
PublicKey const & getNodePublic () const override
json::Value json () override
bool supportsFeature (ProtocolFeature f) const override
std::optional< std::size_tpublisherListSequence (PublicKey const &) const override
void setPublisherListSequence (PublicKey const &, std::size_t const) override
uint256 getClosedLedgerHash () const override
bool hasLedger (uint256 const &hash, std::uint32_t seq) const override
void ledgerRange (std::uint32_t &minSeq, std::uint32_t &maxSeq) const override
bool hasTxSet (uint256 const &hash) const override
void cycleStatus () override
bool hasRange (std::uint32_t uMin, std::uint32_t uMax) override
bool compressionEnabled () const override
bool txReduceRelayEnabled () const override
void sendTxQueue () override
void addTxQueue (uint256 const &) override
void removeTxQueue (uint256 const &) override

Public Attributes

PublicKey nodePublicKey
int id
std::set< int > set

Detailed Description

Simulate two entities - peer directly connected to the server (via squelch in PeerSim) and PeerImp (via Overlay).

Definition at line 71 of file reduce_relay_test.cpp.

Constructor & Destructor Documentation

◆ PeerPartial()

xrpl::test::PeerPartial::PeerPartial ( )

Definition at line 74 of file reduce_relay_test.cpp.

◆ ~PeerPartial()

xrpl::test::PeerPartial::~PeerPartial ( )
overridedefault

Member Function Documentation

◆ onMessage() [1/2]

virtual void xrpl::test::PeerPartial::onMessage ( MessageSPtr const & m,
SquelchCB f )
pure virtual

Implemented in xrpl::test::PeerSim.

◆ onMessage() [2/2]

virtual void xrpl::test::PeerPartial::onMessage ( protocol::TMSquelch const & squelch)
pure virtual

Implemented in xrpl::test::PeerSim.

◆ send() [1/2]

void xrpl::test::PeerPartial::send ( protocol::TMSquelch const & squelch)

Definition at line 85 of file reduce_relay_test.cpp.

◆ send() [2/2]

void xrpl::test::PeerPartial::send ( std::shared_ptr< Message > const & m)
override

Definition at line 92 of file reduce_relay_test.cpp.

◆ getRemoteAddress()

beast::ip::Endpoint xrpl::test::PeerPartial::getRemoteAddress ( ) const
nodiscardoverride

Definition at line 96 of file reduce_relay_test.cpp.

◆ charge()

void xrpl::test::PeerPartial::charge ( resource::Charge const & fee,
std::string const & context = {} )
override

Definition at line 101 of file reduce_relay_test.cpp.

◆ cluster()

bool xrpl::test::PeerPartial::cluster ( ) const
nodiscardoverride

Definition at line 105 of file reduce_relay_test.cpp.

◆ isHighLatency()

bool xrpl::test::PeerPartial::isHighLatency ( ) const
nodiscardoverride

Definition at line 110 of file reduce_relay_test.cpp.

◆ getScore()

int xrpl::test::PeerPartial::getScore ( bool ) const
nodiscardoverride

Definition at line 115 of file reduce_relay_test.cpp.

◆ getNodePublic()

PublicKey const & xrpl::test::PeerPartial::getNodePublic ( ) const
nodiscardoverride

Definition at line 120 of file reduce_relay_test.cpp.

◆ json()

json::Value xrpl::test::PeerPartial::json ( )
override

Definition at line 125 of file reduce_relay_test.cpp.

◆ supportsFeature()

bool xrpl::test::PeerPartial::supportsFeature ( ProtocolFeature f) const
nodiscardoverride

Definition at line 130 of file reduce_relay_test.cpp.

◆ publisherListSequence()

std::optional< std::size_t > xrpl::test::PeerPartial::publisherListSequence ( PublicKey const & ) const
nodiscardoverride

Definition at line 135 of file reduce_relay_test.cpp.

◆ setPublisherListSequence()

void xrpl::test::PeerPartial::setPublisherListSequence ( PublicKey const & ,
std::size_t const  )
override

Definition at line 140 of file reduce_relay_test.cpp.

◆ getClosedLedgerHash()

uint256 xrpl::test::PeerPartial::getClosedLedgerHash ( ) const
nodiscardoverride

Definition at line 144 of file reduce_relay_test.cpp.

◆ hasLedger()

bool xrpl::test::PeerPartial::hasLedger ( uint256 const & hash,
std::uint32_t seq ) const
nodiscardoverride

Definition at line 150 of file reduce_relay_test.cpp.

◆ ledgerRange()

void xrpl::test::PeerPartial::ledgerRange ( std::uint32_t & minSeq,
std::uint32_t & maxSeq ) const
override

Definition at line 155 of file reduce_relay_test.cpp.

◆ hasTxSet()

bool xrpl::test::PeerPartial::hasTxSet ( uint256 const & hash) const
nodiscardoverride

Definition at line 159 of file reduce_relay_test.cpp.

◆ cycleStatus()

void xrpl::test::PeerPartial::cycleStatus ( )
override

Definition at line 164 of file reduce_relay_test.cpp.

◆ hasRange()

bool xrpl::test::PeerPartial::hasRange ( std::uint32_t uMin,
std::uint32_t uMax )
override

Definition at line 168 of file reduce_relay_test.cpp.

◆ compressionEnabled()

bool xrpl::test::PeerPartial::compressionEnabled ( ) const
nodiscardoverride

Definition at line 173 of file reduce_relay_test.cpp.

◆ txReduceRelayEnabled()

bool xrpl::test::PeerPartial::txReduceRelayEnabled ( ) const
nodiscardoverride

Definition at line 178 of file reduce_relay_test.cpp.

◆ sendTxQueue()

void xrpl::test::PeerPartial::sendTxQueue ( )
override

Definition at line 183 of file reduce_relay_test.cpp.

◆ addTxQueue()

void xrpl::test::PeerPartial::addTxQueue ( uint256 const & )
override

Definition at line 187 of file reduce_relay_test.cpp.

◆ removeTxQueue()

void xrpl::test::PeerPartial::removeTxQueue ( uint256 const & )
override

Definition at line 191 of file reduce_relay_test.cpp.

Member Data Documentation

◆ nodePublicKey

PublicKey xrpl::test::PeerPartial::nodePublicKey

Definition at line 78 of file reduce_relay_test.cpp.

◆ id

int xrpl::test::Peer::id
inherited

Definition at line 15 of file BasicNetwork.cpp.

◆ set

std::set<int> xrpl::test::Peer::set
inherited

Definition at line 16 of file BasicNetwork.cpp.