-
Notifications
You must be signed in to change notification settings - Fork 199
/
p2pConfig.go
35 lines (31 loc) · 996 Bytes
/
p2pConfig.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package config
// P2PConfig will hold all the P2P settings
type P2PConfig struct {
Node NodeConfig
KadDhtPeerDiscovery KadDhtPeerDiscoveryConfig
Sharding ShardingConfig
}
// NodeConfig will hold basic p2p settings
type NodeConfig struct {
Port string
Seed string
MaximumExpectedPeerCount uint64
}
// KadDhtPeerDiscoveryConfig will hold the kad-dht discovery config settings
type KadDhtPeerDiscoveryConfig struct {
Enabled bool
RefreshIntervalInSec uint32
RandezVous string
InitialPeerList []string
BucketSize uint32
RoutingTableRefreshIntervalInSec uint32
}
// ShardingConfig will hold the network sharding config settings
type ShardingConfig struct {
TargetPeerCount int
MaxIntraShardValidators uint32
MaxCrossShardValidators uint32
MaxIntraShardObservers uint32
MaxCrossShardObservers uint32
Type string
}