| 
    rippled
    
   | 
 
Simulate a network peer. More...


Public Types | |
| using | ptr = std::shared_ptr< Peer > | 
| using | id_t = std::uint32_t | 
| Uniquely identifies a peer.   | |
Public Member Functions | |
| TestPeer (bool enableLedgerReplay) | |
| void | send (std::shared_ptr< Message > const &m) override | 
| beast::IP::Endpoint | getRemoteAddress () const override | 
| void | charge (Resource::Charge const &fee, std::string const &context={}) override | 
| Adjust this peer's load balance based on the type of load imposed.   | |
| id_t | id () const override | 
| bool | cluster () const override | 
Returns true if this connection is a member of the cluster.   | |
| bool | isHighLatency () const override | 
| int | getScore (bool) const override | 
| PublicKey const & | getNodePublic () const override | 
| Json::Value | json () override | 
| bool | supportsFeature (ProtocolFeature f) const override | 
| std::optional< std::size_t > | publisherListSequence (PublicKey const &) const override | 
| void | setPublisherListSequence (PublicKey const &, std::size_t const) override | 
| uint256 const & | getClosedLedgerHash () const override | 
| bool | hasLedger (uint256 const &hash, std::uint32_t seq) const override | 
| void | ledgerRange (std::uint32_t &minSeq, std::uint32_t &maxSeq) const override | 
| bool | hasTxSet (uint256 const &hash) const override | 
| void | cycleStatus () override | 
| bool | hasRange (std::uint32_t uMin, std::uint32_t uMax) override | 
| bool | compressionEnabled () const override | 
| void | sendTxQueue () override | 
| Send aggregated transactions' hashes.   | |
| void | addTxQueue (uint256 const &) override | 
| Aggregate transaction's hash.   | |
| void | removeTxQueue (uint256 const &) override | 
| Remove hash from the transactions' hashes queue.   | |
| bool | txReduceRelayEnabled () const override | 
| std::string const & | fingerprint () const override | 
Public Attributes | |
| std::string | fingerprint_ | 
| bool | ledgerReplayEnabled_ | 
| PublicKey | nodePublicKey_ | 
Simulate a network peer.
Depending on the configured PeerFeature, it either supports the ProtocolFeature::LedgerReplay or not
Definition at line 188 of file LedgerReplay_test.cpp.
      
  | 
  inherited | 
Definition at line 27 of file xrpld/overlay/Peer.h.
      
  | 
  inherited | 
Uniquely identifies a peer.
This can be stored in tables to find the peer later. Callers can discover if the peer is no longer connected and make adjustments as needed.
Definition at line 34 of file xrpld/overlay/Peer.h.
| ripple::test::TestPeer::TestPeer | ( | bool | enableLedgerReplay | ) | 
Definition at line 191 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 198 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 202 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Adjust this peer's load balance based on the type of load imposed.
Implements ripple::Peer.
Definition at line 207 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 212 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Returns true if this connection is a member of the cluster. 
Implements ripple::Peer.
Definition at line 217 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 222 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 227 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 232 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 237 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 242 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 249 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 254 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 258 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 264 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 269 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 273 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 278 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 282 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 287 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Send aggregated transactions' hashes.
Implements ripple::Peer.
Definition at line 292 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Aggregate transaction's hash.
Implements ripple::Peer.
Definition at line 296 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Remove hash from the transactions' hashes queue.
Implements ripple::Peer.
Definition at line 300 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 304 of file LedgerReplay_test.cpp.
      
  | 
  overridevirtual | 
Implements ripple::Peer.
Definition at line 310 of file LedgerReplay_test.cpp.
| std::string ripple::test::TestPeer::fingerprint_ | 
Definition at line 315 of file LedgerReplay_test.cpp.
| bool ripple::test::TestPeer::ledgerReplayEnabled_ | 
Definition at line 316 of file LedgerReplay_test.cpp.
| PublicKey ripple::test::TestPeer::nodePublicKey_ | 
Definition at line 317 of file LedgerReplay_test.cpp.