rippled
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
ripple::PeerFinder::Tuning Namespace Reference

Heuristically tuned constants. More...

Enumerations

enum  {
  secondsPerConnect = 10 , maxConnectAttempts = 20 , outPercent = 15 , minOutCount = 10 ,
  defaultMaxPeers = 21 , maxRedirects = 30
}
 
enum  { bootcacheSize = 1000 , bootcachePrunePercent = 10 }
 

Functions

static std::chrono::seconds const bootcacheCooldownTime (60)
 
std::chrono::seconds constexpr secondsPerMessage (151)
 
std::chrono::seconds constexpr liveCacheSecondsToLive (30)
 
std::chrono::seconds constexpr recentAttemptDuration (60)
 

Variables

static std::array< int, 10 > const connectionBackoff
 
std::uint32_t constexpr maxHops = 6
 
std::uint32_t constexpr numberOfEndpoints = 2 * maxHops
 
std::uint32_t constexpr numberOfEndpointsMax
 
std::uint32_t constexpr redirectEndpointCount = 10
 

Detailed Description

Heuristically tuned constants.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
secondsPerConnect 

Time to wait between making batches of connection attempts.

maxConnectAttempts 
outPercent 
minOutCount 
defaultMaxPeers 
maxRedirects 

Definition at line 13 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ anonymous enum

anonymous enum
Enumerator
bootcacheSize 
bootcachePrunePercent 

Definition at line 69 of file src/xrpld/peerfinder/detail/Tuning.h.

Function Documentation

◆ bootcacheCooldownTime()

static std::chrono::seconds const ripple::PeerFinder::Tuning::bootcacheCooldownTime ( 60  )
static

◆ secondsPerMessage()

std::chrono::seconds constexpr ripple::PeerFinder::Tuning::secondsPerMessage ( 151  )
constexpr

◆ liveCacheSecondsToLive()

std::chrono::seconds constexpr ripple::PeerFinder::Tuning::liveCacheSecondsToLive ( 30  )
constexpr

◆ recentAttemptDuration()

std::chrono::seconds constexpr ripple::PeerFinder::Tuning::recentAttemptDuration ( 60  )
constexpr

Variable Documentation

◆ connectionBackoff

std::array<int, 10> const ripple::PeerFinder::Tuning::connectionBackoff
static
Initial value:
{
{1, 1, 2, 3, 5, 8, 13, 21, 34, 55}}

Definition at line 60 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ maxHops

std::uint32_t constexpr ripple::PeerFinder::Tuning::maxHops = 6
constexpr

Definition at line 91 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ numberOfEndpoints

std::uint32_t constexpr ripple::PeerFinder::Tuning::numberOfEndpoints = 2 * maxHops
constexpr

Definition at line 94 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ numberOfEndpointsMax

std::uint32_t constexpr ripple::PeerFinder::Tuning::numberOfEndpointsMax
constexpr
Initial value:
=
std::max<decltype(numberOfEndpoints)>(numberOfEndpoints * 2, 64)
T is_same_v

Definition at line 97 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ redirectEndpointCount

std::uint32_t constexpr ripple::PeerFinder::Tuning::redirectEndpointCount = 10
constexpr

Definition at line 101 of file src/xrpld/peerfinder/detail/Tuning.h.