-
Notifications
You must be signed in to change notification settings - Fork 249
/
cluster.go
42 lines (36 loc) · 1.34 KB
/
cluster.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
36
37
38
39
40
41
42
package params
// Define available fleets.
const (
FleetUndefined = ""
FleetProd = "eth.prod"
FleetStaging = "eth.staging"
FleetTest = "eth.test"
FleetWakuV2Prod = "wakuv2.prod"
FleetWakuV2Test = "wakuv2.test"
FleetStatusTest = "status.test"
FleetStatusProd = "status.prod"
FleetShardsTest = "shards.test"
)
// Cluster defines a list of Ethereum nodes.
type Cluster struct {
StaticNodes []string `json:"staticnodes"`
BootNodes []string `json:"bootnodes"`
MailServers []string `json:"mailservers"` // list of trusted mail servers
RendezvousNodes []string `json:"rendezvousnodes"`
}
// DefaultWakuNodes is a list of "supported" fleets. This list is populated to clients UI settings.
var supportedFleets = map[string][]string{
FleetWakuV2Prod: {"enrtree://ANEDLO25QVUGJOUTQFRYKWX6P4Z4GKVESBMHML7DZ6YK4LGS5FC5O@prod.wakuv2.nodes.status.im"},
FleetWakuV2Test: {"enrtree://AO47IDOLBKH72HIZZOXQP6NMRESAN7CHYWIBNXDXWRJRZWLODKII6@test.wakuv2.nodes.status.im"},
FleetShardsTest: {"enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.test.shards.nodes.status.im"},
}
func DefaultWakuNodes(fleet string) []string {
return supportedFleets[fleet]
}
func IsFleetSupported(fleet string) bool {
_, ok := supportedFleets[fleet]
return ok
}
func GetSupportedFleets() map[string][]string {
return supportedFleets
}