1#include <xrpld/peerfinder/PeerfinderManager.h>
2#include <xrpld/peerfinder/detail/Tuning.h>
8 : maxPeers(Tuning::defaultMaxPeers)
9 , outPeers(calcOutPeers())
73 bool validationPublicKey,
115 if (validationPublicKey)
std::size_t PEERS_OUT_MAX
bool operator==(Endpoint const &a, Endpoint const &b)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
PeerFinder configuration settings.
std::size_t maxPeers
The largest number of public peer slots to allow.
int ipLimit
Limit how many incoming connections we allow per IP.
std::size_t outPeers
The number of automatic outbound connections to maintain.
void onWrite(beast::PropertyStream::Map &map)
Write the configuration into a property stream.
Config()
Create a configuration with default values.
void applyTuning()
Adjusts the values so they follow the business rules.
bool wantIncoming
true if we want to accept incoming connections.
bool autoConnect
true if we want to establish connections automatically
std::string features
The set of features we advertise.
std::size_t inPeers
The number of automatic inbound connections to maintain.
static Config makeConfig(xrpl::Config const &config, std::uint16_t port, bool validationPublicKey, int ipLimit)
Make PeerFinder::Config from configuration parameters.
std::uint16_t listeningPort
The listening port number.
std::size_t calcOutPeers() const
Returns a suitable value for outPeers according to the rules.
bool peerPrivate
true if we want our IP address kept private.