rippled
Public Member Functions | Private Attributes | List of all members
ripple::test::Network Class Reference
Collaboration diagram for ripple::test::Network:
Collaboration graph
[legend]

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 for_rand (std::uint32_t min, std::uint32_t max, std::function< void(std::uint32_t)> f)
 
void propagate (LinkIterCB link, std::uint16_t nValidators=MAX_VALIDATORS, std::uint32_t nMessages=MAX_MESSAGES, bool purge=true, bool resetClock=true)
 
bool isSelected (Peer::id_t id)
 Is peer in Selected state in any of the slots. More...
 
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. More...
 

Private Attributes

OverlaySim overlay_
 
std::vector< Validatorvalidators_
 

Detailed Description

Definition at line 688 of file reduce_relay_test.cpp.

Constructor & Destructor Documentation

◆ Network()

ripple::test::Network::Network ( Application app)

Definition at line 691 of file reduce_relay_test.cpp.

◆ ~Network()

ripple::test::Network::~Network ( )
default

Member Function Documentation

◆ init()

void ripple::test::Network::init ( )

Definition at line 697 of file reduce_relay_test.cpp.

◆ reset()

void ripple::test::Network::reset ( )

Definition at line 711 of file reduce_relay_test.cpp.

◆ addPeer()

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

Definition at line 721 of file reduce_relay_test.cpp.

◆ deleteLastPeer()

void ripple::test::Network::deleteLastPeer ( )

Definition at line 730 of file reduce_relay_test.cpp.

◆ purgePeers()

void ripple::test::Network::purgePeers ( )

Definition at line 742 of file reduce_relay_test.cpp.

◆ validator()

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

Definition at line 749 of file reduce_relay_test.cpp.

◆ overlay()

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

Definition at line 756 of file reduce_relay_test.cpp.

◆ enableLink()

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

Definition at line 762 of file reduce_relay_test.cpp.

◆ onDisconnectPeer()

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

Definition at line 776 of file reduce_relay_test.cpp.

◆ for_rand()

void ripple::test::Network::for_rand ( std::uint32_t  min,
std::uint32_t  max,
std::function< void(std::uint32_t)>  f 
)

Definition at line 796 of file reduce_relay_test.cpp.

◆ propagate()

void ripple::test::Network::propagate ( LinkIterCB  link,
std::uint16_t  nValidators = MAX_VALIDATORS,
std::uint32_t  nMessages = MAX_MESSAGES,
bool  purge = true,
bool  resetClock = true 
)

Definition at line 812 of file reduce_relay_test.cpp.

◆ isSelected()

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

Is peer in Selected state in any of the slots.

Definition at line 839 of file reduce_relay_test.cpp.

◆ allCounting()

bool ripple::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 854 of file reduce_relay_test.cpp.

Member Data Documentation

◆ overlay_

OverlaySim ripple::test::Network::overlay_
private

Definition at line 873 of file reduce_relay_test.cpp.

◆ validators_

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

Definition at line 874 of file reduce_relay_test.cpp.