|
rippled
|


Public Types | |
| using | id_t = Peer::id_t |
| using | clock_type = ManualClock |
Public Member Functions | |
| OverlaySim (Application &app) | |
| ~OverlaySim ()=default | |
| void | clear () |
| std::uint16_t | inState (PublicKey const &validator, squelch::PeerState state) |
| void | updateSlotAndSquelch (uint256 const &key, PublicKey const &validator, Peer::id_t id, SquelchCB f, protocol::MessageType type=protocol::mtVALIDATION) override |
| void | deletePeer (id_t id, UnsquelchCB f) override |
| void | deleteIdlePeers (UnsquelchCB f) override |
| PeerSPtr | addPeer (bool useCache=true) |
| void | deletePeer (Peer::id_t id, bool useCache=true) |
| void | resetPeers () |
| std::optional< Peer::id_t > | deleteLastPeer () |
| bool | isCountingState (PublicKey const &validator) |
| std::set< id_t > | getSelected (PublicKey const &validator) |
| bool | isSelected (PublicKey const &validator, Peer::id_t peer) |
| id_t | getSelectedPeer (PublicKey const &validator) |
| std::unordered_map< id_t, std::tuple< squelch::PeerState, std::uint16_t, std::uint32_t, std::uint32_t > > | getPeers (PublicKey const &validator) |
| std::uint16_t | getNumPeers () const |
Private Types | |
| using | Peers = std::unordered_map< Peer::id_t, PeerSPtr > |
Private Member Functions | |
| void | squelch (PublicKey const &validator, Peer::id_t id, std::uint32_t squelchDuration) const override |
| Squelch handler. More... | |
| void | unsquelch (PublicKey const &validator, Peer::id_t id) const override |
| Unsquelch handler. More... | |
Private Attributes | |
| SquelchCB | squelch_ |
| UnsquelchCB | unsquelch_ |
| Peers | peers_ |
| Peers | peersCache_ |
| squelch::Slots< ManualClock > | slots_ |
Definition at line 487 of file reduce_relay_test.cpp.
|
private |
Definition at line 489 of file reduce_relay_test.cpp.
Definition at line 492 of file reduce_relay_test.cpp.
Definition at line 493 of file reduce_relay_test.cpp.
| ripple::test::OverlaySim::OverlaySim | ( | Application & | app | ) |
Definition at line 494 of file reduce_relay_test.cpp.
|
default |
| void ripple::test::OverlaySim::clear | ( | ) |
Definition at line 501 of file reduce_relay_test.cpp.
| std::uint16_t ripple::test::OverlaySim::inState | ( | PublicKey const & | validator, |
| squelch::PeerState | state | ||
| ) |
Definition at line 509 of file reduce_relay_test.cpp.
|
overridevirtual |
Implements ripple::test::Overlay.
Definition at line 516 of file reduce_relay_test.cpp.
|
overridevirtual |
Implements ripple::test::Overlay.
Definition at line 528 of file reduce_relay_test.cpp.
|
overridevirtual |
Implements ripple::test::Overlay.
Definition at line 535 of file reduce_relay_test.cpp.
| PeerSPtr ripple::test::OverlaySim::addPeer | ( | bool | useCache = true | ) |
Definition at line 542 of file reduce_relay_test.cpp.
| void ripple::test::OverlaySim::deletePeer | ( | Peer::id_t | id, |
| bool | useCache = true |
||
| ) |
Definition at line 563 of file reduce_relay_test.cpp.
| void ripple::test::OverlaySim::resetPeers | ( | ) |
Definition at line 574 of file reduce_relay_test.cpp.
| std::optional<Peer::id_t> ripple::test::OverlaySim::deleteLastPeer | ( | ) |
Definition at line 583 of file reduce_relay_test.cpp.
| bool ripple::test::OverlaySim::isCountingState | ( | PublicKey const & | validator | ) |
Definition at line 603 of file reduce_relay_test.cpp.
Definition at line 609 of file reduce_relay_test.cpp.
| bool ripple::test::OverlaySim::isSelected | ( | PublicKey const & | validator, |
| Peer::id_t | peer | ||
| ) |
Definition at line 615 of file reduce_relay_test.cpp.
Definition at line 622 of file reduce_relay_test.cpp.
| std::unordered_map< id_t, std::tuple< squelch::PeerState, std::uint16_t, std::uint32_t, std::uint32_t> > ripple::test::OverlaySim::getPeers | ( | PublicKey const & | validator | ) |
Definition at line 636 of file reduce_relay_test.cpp.
| std::uint16_t ripple::test::OverlaySim::getNumPeers | ( | ) | const |
Definition at line 642 of file reduce_relay_test.cpp.
|
overrideprivatevirtual |
Squelch handler.
| validator | Public key of the source validator |
| id | Peer's id to squelch |
| duration | Squelch duration in seconds |
Implements ripple::squelch::SquelchHandler.
Definition at line 649 of file reduce_relay_test.cpp.
|
overrideprivatevirtual |
Unsquelch handler.
| validator | Public key of the source validator |
| id | Peer's id to unsquelch |
Implements ripple::squelch::SquelchHandler.
Definition at line 658 of file reduce_relay_test.cpp.
|
private |
Definition at line 663 of file reduce_relay_test.cpp.
|
private |
Definition at line 664 of file reduce_relay_test.cpp.
|
private |
Definition at line 665 of file reduce_relay_test.cpp.
|
private |
Definition at line 666 of file reduce_relay_test.cpp.
|
private |
Definition at line 667 of file reduce_relay_test.cpp.
1.8.17