20 #ifndef RIPPLE_OVERLAY_PEER_H_INCLUDED
21 #define RIPPLE_OVERLAY_PEER_H_INCLUDED
23 #include <ripple/basics/base_uint.h>
24 #include <ripple/beast/net/IPEndpoint.h>
25 #include <ripple/json/json_value.h>
26 #include <ripple/overlay/Message.h>
27 #include <ripple/protocol/PublicKey.h>
57 virtual ~Peer() =
default;
virtual void addTxQueue(uint256 const &)=0
Aggregate transaction's hash.
virtual void ledgerRange(std::uint32_t &minSeq, std::uint32_t &maxSeq) const =0
virtual uint256 const & getClosedLedgerHash() const =0
virtual bool hasRange(std::uint32_t uMin, std::uint32_t uMax)=0
virtual bool cluster() const =0
Returns true if this connection is a member of the cluster.
static constexpr std::uint32_t relayLimit
virtual bool isHighLatency() const =0
virtual void cycleStatus()=0
virtual PublicKey const & getNodePublic() const =0
virtual bool hasTxSet(uint256 const &hash) const =0
virtual void send(std::shared_ptr< Message > const &m)=0
virtual void removeTxQueue(uint256 const &)=0
Remove hash from the transactions' hashes queue.
virtual bool txReduceRelayEnabled() const =0
virtual void charge(Resource::Charge const &fee)=0
Adjust this peer's load balance based on the type of load imposed.
virtual std::optional< std::size_t > publisherListSequence(PublicKey const &) const =0
virtual Json::Value json()=0
virtual void setPublisherListSequence(PublicKey const &, std::size_t const)=0
virtual bool supportsFeature(ProtocolFeature f) const =0
virtual bool hasLedger(uint256 const &hash, std::uint32_t seq) const =0
virtual beast::IP::Endpoint getRemoteAddress() const =0
virtual void sendTxQueue()=0
Send aggregated transactions' hashes.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual int getScore(bool) const =0
@ ValidatorList2Propagation
virtual id_t id() const =0
@ ValidatorListPropagation
A version-independent IP address and port combination.
virtual bool compressionEnabled() const =0
Represents a peer connection in the overlay.