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