rippled
|
Classes | |
struct | Event |
struct | Handler |
Public Member Functions | |
reduce_relay_test () | |
void | run () override |
Protected Types | |
enum | State { On, Off, WaitReset } |
enum | EventType { LinkDown = 0, PeerDisconnected = 1 } |
Protected Member Functions | |
void | printPeers (const std::string &msg, std::uint16_t validator=0) |
Peer::id_t | sendSquelch (PublicKey const &validator, PeerWPtr const &peerPtr, std::optional< std::uint32_t > duration) |
Send squelch (if duration is set) or unsquelch (if duration not set) More... | |
void | random (bool log) |
Randomly brings the link between a validator and a peer down. More... | |
bool | checkCounting (PublicKey const &validator, bool isCountingState) |
void | doTest (const std::string &msg, bool log, std::function< void(bool)> f) |
void | testInitialRound (bool log) |
Initial counting round: three peers receive message "faster" then others. More... | |
void | testPeerUnsquelchedTooSoon (bool log) |
Receiving message from squelched peer too soon should not change the slot's state to Counting. More... | |
void | testPeerUnsquelched (bool log) |
Receiving message from squelched peer should change the slot's state to Counting. More... | |
bool | propagateAndSquelch (bool log, bool purge=true, bool resetClock=true) |
Propagate enough messages to generate one squelch event. More... | |
bool | propagateNoSquelch (bool log, std::uint16_t nMessages, bool countingState, bool purge=true, bool resetClock=true) |
Send fewer message so that squelch event is not generated. More... | |
void | testNewPeer (bool log) |
Receiving a message from new peer should change the slot's state to Counting. More... | |
void | testSelectedPeerDisconnects (bool log) |
Selected peer disconnects. More... | |
void | testSelectedPeerStopsRelaying (bool log) |
Selected peer stops relaying. More... | |
void | testSquelchedPeerDisconnects (bool log) |
Squelched peer disconnects. More... | |
void | testConfig (bool log) |
void | testInternalHashRouter (bool log) |
void | testRandomSquelch (bool l) |
void | testHandshake (bool log) |
Protected Attributes | |
jtx::Env | env_ |
Network | network_ |
Private Types | |
using | Slot = reduce_relay::Slot< ManualClock > |
using | id_t = Peer::id_t |
Definition at line 877 of file reduce_relay_test.cpp.
|
private |
Definition at line 879 of file reduce_relay_test.cpp.
|
private |
Definition at line 880 of file reduce_relay_test.cpp.
|
protected |
Enumerator | |
---|---|
On | |
Off | |
WaitReset |
Definition at line 915 of file reduce_relay_test.cpp.
|
protected |
Enumerator | |
---|---|
LinkDown | |
PeerDisconnected |
Definition at line 916 of file reduce_relay_test.cpp.
ripple::test::reduce_relay_test::reduce_relay_test | ( | ) |
Definition at line 1557 of file reduce_relay_test.cpp.
|
protected |
Definition at line 884 of file reduce_relay_test.cpp.
|
protected |
Send squelch (if duration is set) or unsquelch (if duration not set)
Definition at line 898 of file reduce_relay_test.cpp.
|
protected |
Randomly brings the link between a validator and a peer down.
Randomly disconnects a peer. Those events are generated one at a time.
Definition at line 938 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1112 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1120 of file reduce_relay_test.cpp.
|
protected |
Initial counting round: three peers receive message "faster" then others.
Once the message count for the three peers reaches threshold the rest of the peers are squelched and the slot for the given validator is in Selected state.
Definition at line 1132 of file reduce_relay_test.cpp.
|
protected |
Receiving message from squelched peer too soon should not change the slot's state to Counting.
Definition at line 1143 of file reduce_relay_test.cpp.
|
protected |
Receiving message from squelched peer should change the slot's state to Counting.
Definition at line 1154 of file reduce_relay_test.cpp.
|
protected |
Propagate enough messages to generate one squelch event.
Definition at line 1164 of file reduce_relay_test.cpp.
|
protected |
Send fewer message so that squelch event is not generated.
Definition at line 1200 of file reduce_relay_test.cpp.
|
protected |
Receiving a message from new peer should change the slot's state to Counting.
Definition at line 1231 of file reduce_relay_test.cpp.
|
protected |
Selected peer disconnects.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1243 of file reduce_relay_test.cpp.
|
protected |
Selected peer stops relaying.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1263 of file reduce_relay_test.cpp.
|
protected |
Squelched peer disconnects.
Should not change the state to counting.
Definition at line 1284 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1306 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1348 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1410 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1489 of file reduce_relay_test.cpp.
|
override |
Definition at line 1562 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1553 of file reduce_relay_test.cpp.
|
protected |
Definition at line 1554 of file reduce_relay_test.cpp.