xrpld
Loading...
Searching...
No Matches
xrpl::test::Network Class Reference
Collaboration diagram for xrpl::test::Network:

Public Member Functions

 Network (Application &app)
void init ()
 ~Network ()=default
void reset ()
Peer::id_t addPeer ()
void deleteLastPeer ()
void purgePeers ()
Validatorvalidator (std::uint16_t v)
OverlaySimoverlay ()
void enableLink (std::uint16_t validatorId, Peer::id_t peer, bool enable)
void onDisconnectPeer (Peer::id_t peer)
void propagate (LinkIterCB link, std::uint16_t nValidators=kMaxValidators, std::uint32_t nMessages=kMaxMessages, bool purge=true, bool resetClock=true)
bool isSelected (Peer::id_t id)
 Is peer in Selected state in any of the slots.
bool allCounting (Peer::id_t peer)
 Check if there are peers to unsquelch - peer is in Selected state in any of the slots and there are peers in Squelched state in those slots.

Static Public Member Functions

static void forRand (std::uint32_t min, std::uint32_t max, std::function< void(std::uint32_t)> f)

Private Attributes

OverlaySim overlay_
std::vector< Validatorvalidators_

Detailed Description

Definition at line 696 of file reduce_relay_test.cpp.

Constructor & Destructor Documentation

◆ Network()

xrpl::test::Network::Network ( Application & app)

Definition at line 699 of file reduce_relay_test.cpp.

◆ ~Network()

xrpl::test::Network::~Network ( )
default

Member Function Documentation

◆ init()

void xrpl::test::Network::init ( )

Definition at line 705 of file reduce_relay_test.cpp.

◆ reset()

void xrpl::test::Network::reset ( )

Definition at line 719 of file reduce_relay_test.cpp.

◆ addPeer()

Peer::id_t xrpl::test::Network::addPeer ( )

Definition at line 729 of file reduce_relay_test.cpp.

◆ deleteLastPeer()

void xrpl::test::Network::deleteLastPeer ( )

Definition at line 738 of file reduce_relay_test.cpp.

◆ purgePeers()

void xrpl::test::Network::purgePeers ( )

Definition at line 750 of file reduce_relay_test.cpp.

◆ validator()

Validator & xrpl::test::Network::validator ( std::uint16_t v)

Definition at line 757 of file reduce_relay_test.cpp.

◆ overlay()

OverlaySim & xrpl::test::Network::overlay ( )

Definition at line 764 of file reduce_relay_test.cpp.

◆ enableLink()

void xrpl::test::Network::enableLink ( std::uint16_t validatorId,
Peer::id_t peer,
bool enable )

Definition at line 770 of file reduce_relay_test.cpp.

◆ onDisconnectPeer()

void xrpl::test::Network::onDisconnectPeer ( Peer::id_t peer)

Definition at line 785 of file reduce_relay_test.cpp.

◆ forRand()

void xrpl::test::Network::forRand ( std::uint32_t min,
std::uint32_t max,
std::function< void(std::uint32_t)> f )
static

Definition at line 805 of file reduce_relay_test.cpp.

◆ propagate()

void xrpl::test::Network::propagate ( LinkIterCB link,
std::uint16_t nValidators = kMaxValidators,
std::uint32_t nMessages = kMaxMessages,
bool purge = true,
bool resetClock = true )

Definition at line 818 of file reduce_relay_test.cpp.

◆ isSelected()

bool xrpl::test::Network::isSelected ( Peer::id_t id)

Is peer in Selected state in any of the slots.

Definition at line 843 of file reduce_relay_test.cpp.

◆ allCounting()

bool xrpl::test::Network::allCounting ( Peer::id_t peer)

Check if there are peers to unsquelch - peer is in Selected state in any of the slots and there are peers in Squelched state in those slots.

Definition at line 858 of file reduce_relay_test.cpp.

Member Data Documentation

◆ overlay_

OverlaySim xrpl::test::Network::overlay_
private

Definition at line 876 of file reduce_relay_test.cpp.

◆ validators_

std::vector<Validator> xrpl::test::Network::validators_
private

Definition at line 877 of file reduce_relay_test.cpp.