Kagome
Polkadot Runtime Engine in C++17
peering_config.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_NETWORK_PEERING_CONFIG
7 #define KAGOME_NETWORK_PEERING_CONFIG
8 
9 #include <chrono>
10 
11 namespace kagome::network {
12 
13  struct PeeringConfig {
15  std::chrono::seconds peerTtl = std::chrono::minutes(10);
16 
18  std::chrono::seconds aligningPeriod = std::chrono::seconds(5);
19 
21  size_t targetPeerAmount = 20;
22 
24  size_t softLimit = 40;
25 
27  size_t hardLimit = 60;
28  };
29 
30 } // namespace kagome::network
31 
32 #endif // KAGOME_NETWORK_PEERING_CONFIG
std::chrono::seconds peerTtl
Time of peer inactivity to disconnect.
size_t hardLimit
Max peers before start forced disconnection.
size_t softLimit
Max peers count before start to disconnect of inactive ones.
std::chrono::seconds aligningPeriod
Period of active peers amount aligning.
size_t targetPeerAmount
Target amount of active peers.