|
rippled
|
Simulate a peerSet that supplies peers to ledger replay subtasks. More...


Public Member Functions | |
| TestPeerSet (LedgerReplayMsgHandler &me, LedgerReplayMsgHandler &other, PeerSetBehavior bhvr, bool enableLedgerReplay) | |
| void | addPeers (std::size_t limit, std::function< bool(std::shared_ptr< Peer > const &)> hasItem, std::function< void(std::shared_ptr< Peer > const &)> onPeerAdded) override |
| Try add more peers. More... | |
| void | sendRequest (::google::protobuf::Message const &msg, protocol::MessageType type, std::shared_ptr< Peer > const &peer) override |
| const std::set< Peer::id_t > & | getPeerIds () const override |
| get the set of ids of previously added peers More... | |
| template<typename MessageType > | |
| void | sendRequest (MessageType const &message, std::shared_ptr< Peer > const &peer) |
| send a message More... | |
Public Attributes | |
| LedgerReplayMsgHandler & | local |
| LedgerReplayMsgHandler & | remote |
| std::shared_ptr< TestPeer > | dummyPeer |
| PeerSetBehavior | behavior |
Simulate a peerSet that supplies peers to ledger replay subtasks.
It connects the ledger replay client side and server side message handlers. Depending on the configured PeerSetBehavior, it may drop or repeat some of the messages.
Definition at line 336 of file LedgerReplay_test.cpp.
| ripple::test::TestPeerSet::TestPeerSet | ( | LedgerReplayMsgHandler & | me, |
| LedgerReplayMsgHandler & | other, | ||
| PeerSetBehavior | bhvr, | ||
| bool | enableLedgerReplay | ||
| ) |
Definition at line 338 of file LedgerReplay_test.cpp.
|
overridevirtual |
Try add more peers.
| limit | number of peers to add |
| hasItem | callback that helps to select peers |
| onPeerAdded | callback called when a peer is added |
Implements ripple::PeerSet.
Definition at line 351 of file LedgerReplay_test.cpp.
|
overridevirtual |
Implements ripple::PeerSet.
Definition at line 361 of file LedgerReplay_test.cpp.
|
overridevirtual |
get the set of ids of previously added peers
Implements ripple::PeerSet.
Definition at line 407 of file LedgerReplay_test.cpp.
|
inherited |
| LedgerReplayMsgHandler& ripple::test::TestPeerSet::local |
Definition at line 413 of file LedgerReplay_test.cpp.
| LedgerReplayMsgHandler& ripple::test::TestPeerSet::remote |
Definition at line 414 of file LedgerReplay_test.cpp.
| std::shared_ptr<TestPeer> ripple::test::TestPeerSet::dummyPeer |
Definition at line 415 of file LedgerReplay_test.cpp.
| PeerSetBehavior ripple::test::TestPeerSet::behavior |
Definition at line 416 of file LedgerReplay_test.cpp.
1.8.17