rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
ripple::test::Validator Class Reference

Simulate Validator. More...

Collaboration diagram for ripple::test::Validator:
Collaboration graph
[legend]

Public Member Functions

 Validator ()
 
 Validator (Validator const &)=default
 
 Validator (Validator &&)=default
 
Validatoroperator= (Validator const &)=default
 
Validatoroperator= (Validator &&)=default
 
 ~Validator ()
 
void clear ()
 
PublicKey const & key ()
 
 operator PublicKey () const
 
void addPeer (PeerSPtr peer)
 
void deletePeer (Peer::id_t id)
 
void for_links (std::vector< Peer::id_t > peers, LinkIterCB f)
 
void for_links (LinkIterCB f, bool simulateSlow=false)
 
void send (std::vector< Peer::id_t > peers, SquelchCB f)
 Send to specific peers.
 
void send (SquelchCB f)
 Send to all peers.
 
MessageSPtr message ()
 
std::uint16_t id ()
 
void linkUp (Peer::id_t id)
 
void linkDown (Peer::id_t id)
 

Static Public Member Functions

static void resetId ()
 

Private Types

using Links = std::unordered_map< Peer::id_t, LinkSPtr >
 

Private Attributes

Links links_
 
PublicKey pkey_
 
MessageSPtr message_ = nullptr
 
std::uint16_t id_ = 0
 

Static Private Attributes

static std::uint16_t sid_ = 0
 

Detailed Description

Simulate Validator.

Definition at line 304 of file reduce_relay_test.cpp.

Member Typedef Documentation

◆ Links

Definition at line 306 of file reduce_relay_test.cpp.

Constructor & Destructor Documentation

◆ Validator() [1/3]

ripple::test::Validator::Validator ( )

Definition at line 309 of file reduce_relay_test.cpp.

◆ Validator() [2/3]

ripple::test::Validator::Validator ( Validator const &  )
default

◆ Validator() [3/3]

ripple::test::Validator::Validator ( Validator &&  )
default

◆ ~Validator()

ripple::test::Validator::~Validator ( )

Definition at line 322 of file reduce_relay_test.cpp.

Member Function Documentation

◆ operator=() [1/2]

Validator & ripple::test::Validator::operator= ( Validator const &  )
default

◆ operator=() [2/2]

Validator & ripple::test::Validator::operator= ( Validator &&  )
default

◆ clear()

void ripple::test::Validator::clear ( )

Definition at line 328 of file reduce_relay_test.cpp.

◆ resetId()

static void ripple::test::Validator::resetId ( )
static

Definition at line 334 of file reduce_relay_test.cpp.

◆ key()

PublicKey const & ripple::test::Validator::key ( )

Definition at line 340 of file reduce_relay_test.cpp.

◆ operator PublicKey()

ripple::test::Validator::operator PublicKey ( ) const

Definition at line 345 of file reduce_relay_test.cpp.

◆ addPeer()

void ripple::test::Validator::addPeer ( PeerSPtr  peer)

Definition at line 351 of file reduce_relay_test.cpp.

◆ deletePeer()

void ripple::test::Validator::deletePeer ( Peer::id_t  id)

Definition at line 358 of file reduce_relay_test.cpp.

◆ for_links() [1/2]

void ripple::test::Validator::for_links ( std::vector< Peer::id_t peers,
LinkIterCB  f 
)

Definition at line 364 of file reduce_relay_test.cpp.

◆ for_links() [2/2]

void ripple::test::Validator::for_links ( LinkIterCB  f,
bool  simulateSlow = false 
)

Definition at line 374 of file reduce_relay_test.cpp.

◆ send() [1/2]

void ripple::test::Validator::send ( std::vector< Peer::id_t peers,
SquelchCB  f 
)

Send to specific peers.

Definition at line 393 of file reduce_relay_test.cpp.

◆ send() [2/2]

void ripple::test::Validator::send ( SquelchCB  f)

Send to all peers.

Definition at line 400 of file reduce_relay_test.cpp.

◆ message()

MessageSPtr ripple::test::Validator::message ( )

Definition at line 406 of file reduce_relay_test.cpp.

◆ id()

std::uint16_t ripple::test::Validator::id ( )

Definition at line 412 of file reduce_relay_test.cpp.

◆ linkUp()

void ripple::test::Validator::linkUp ( Peer::id_t  id)

Definition at line 418 of file reduce_relay_test.cpp.

◆ linkDown()

void ripple::test::Validator::linkDown ( Peer::id_t  id)

Definition at line 426 of file reduce_relay_test.cpp.

Member Data Documentation

◆ links_

Links ripple::test::Validator::links_
private

Definition at line 434 of file reduce_relay_test.cpp.

◆ pkey_

PublicKey ripple::test::Validator::pkey_
private

Definition at line 435 of file reduce_relay_test.cpp.

◆ message_

MessageSPtr ripple::test::Validator::message_ = nullptr
private

Definition at line 436 of file reduce_relay_test.cpp.

◆ sid_

std::uint16_t ripple::test::Validator::sid_ = 0
staticprivate

Definition at line 437 of file reduce_relay_test.cpp.

◆ id_

std::uint16_t ripple::test::Validator::id_ = 0
private

Definition at line 438 of file reduce_relay_test.cpp.