|
xrpld
|
A peer that records what it was charged. More...
#include <AcquireTestHelpers.h>


Public Member Functions | |
| ChargeRecordingPeer (bool hasTxSet=true) | |
| void | charge (resource::Charge const &fee, std::string const &) override |
| std::vector< resource::Charge > const & | charges () const |
| bool | hasTxSet (UInt256 const &) const override |
| bool | hasLedger (UInt256 const &, std::uint32_t) const override |
| void | send (std::shared_ptr< Message > const &) override |
| beast::ip::Endpoint | getRemoteAddress () const override |
| void | sendTxQueue () override |
| void | addTxQueue (UInt256 const &) override |
| void | removeTxQueue (UInt256 const &) override |
| ID | id () const override |
| bool | cluster () const override |
| bool | isHighLatency () const override |
| int | getScore (bool) const override |
| PublicKey const & | getNodePublic () const override |
| json::Value | json () override |
| bool | supportsFeature (ProtocolFeature) const override |
| std::optional< std::size_t > | publisherListSequence (PublicKey const &) const override |
| void | setPublisherListSequence (PublicKey const &, std::size_t const) override |
| std::string const & | fingerprint () const override |
| UInt256 | getClosedLedgerHash () const override |
| void | ledgerRange (std::uint32_t &, std::uint32_t &) const override |
| void | cycleStatus () override |
| bool | hasRange (std::uint32_t, std::uint32_t) override |
| bool | compressionEnabled () const override |
| bool | txReduceRelayEnabled () const override |
Public Attributes | |
| int | id |
| std::set< int > | set |
Static Private Member Functions | |
| static ID | nextId () |
| The next id to hand out, distinct per instance because RequestCountingPeerSet dedups by tracked id and PeerStub's own default is zero for every instance. | |
Private Attributes | |
| std::vector< resource::Charge > | charges_ |
| bool | hasTxSet_ |
| ID const | id_ |
| PublicKey const | nodePublicKey_ |
| std::string const | fingerprint_ |
A peer that records what it was charged.
Every other method comes from PeerStub.
One instance per packet keeps charges() unambiguous about which packet was charged what.
charges_ is unguarded: charging happens on the packet path, so every charge lands on the thread that fed the packet in.
Definition at line 57 of file AcquireTestHelpers.h.
|
explicit |
| hasTxSet | What hasTxSet() reports, which is how an acquisition decides whether this peer is worth asking. Defaults to true, so a peer handed straight to takeNodes() needs no argument. |
Definition at line 65 of file AcquireTestHelpers.h.
|
override |
Definition at line 70 of file AcquireTestHelpers.h.
|
nodiscard |
Definition at line 79 of file AcquireTestHelpers.h.
|
nodiscardoverride |
Definition at line 87 of file AcquireTestHelpers.h.
|
nodiscardoverride |
Definition at line 93 of file AcquireTestHelpers.h.
|
staticnodiscardprivate |
The next id to hand out, distinct per instance because RequestCountingPeerSet dedups by tracked id and PeerStub's own default is zero for every instance.
Definition at line 107 of file AcquireTestHelpers.h.
|
overrideinherited |
Definition at line 44 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 49 of file PeerStub.h.
|
overrideinherited |
Definition at line 55 of file PeerStub.h.
|
overrideinherited |
Definition at line 60 of file PeerStub.h.
|
overrideinherited |
Definition at line 65 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 75 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 81 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 87 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 93 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 99 of file PeerStub.h.
|
overrideinherited |
Definition at line 105 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 111 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 117 of file PeerStub.h.
|
overrideinherited |
Definition at line 123 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 128 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 134 of file PeerStub.h.
|
overrideinherited |
Definition at line 146 of file PeerStub.h.
|
overrideinherited |
Definition at line 157 of file PeerStub.h.
|
overrideinherited |
Definition at line 162 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 168 of file PeerStub.h.
|
nodiscardoverrideinherited |
Definition at line 174 of file PeerStub.h.
|
private |
Definition at line 113 of file AcquireTestHelpers.h.
|
private |
Definition at line 114 of file AcquireTestHelpers.h.
|
privateinherited |
Definition at line 180 of file PeerStub.h.
|
privateinherited |
Definition at line 181 of file PeerStub.h.
|
privateinherited |
Definition at line 182 of file PeerStub.h.
|
inherited |
Definition at line 15 of file BasicNetwork.cpp.
|
inherited |
Definition at line 16 of file BasicNetwork.cpp.