-
Notifications
You must be signed in to change notification settings - Fork 68
/
config_types.go
69 lines (59 loc) · 1.71 KB
/
config_types.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package liteclient
type GlobalConfig struct {
Type string `json:"@type"`
DHT DHTConfig `json:"dht"`
Liteservers []LiteserverConfig `json:"liteservers"`
Validator ValidatorConfig `json:"validator"`
}
type DHTConfig struct {
Type string `json:"@type"`
K int `json:"k"`
A int `json:"a"`
StaticNodes DHTNodes `json:"static_nodes"`
}
type DHTNodes struct {
Type string `json:"@type"`
Nodes []DHTNode `json:"nodes"`
}
type DHTNode struct {
Type string `json:"@type"`
ID ServerID `json:"id"`
AddrList DHTAddressList `json:"addr_list"`
Version int `json:"version"`
Signature string `json:"signature"`
}
type LiteserverConfig struct {
IP int64 `json:"ip"`
Port int `json:"port"`
ID ServerID `json:"id"`
}
type DHTAddressList struct {
Type string `json:"@type"`
Addrs []DHTAddress `json:"addrs"`
Version int `json:"version"`
ReinitDate int `json:"reinit_date"`
Priority int `json:"priority"`
ExpireAt int `json:"expire_at"`
}
type DHTAddress struct {
Type string `json:"@type"`
IP int `json:"ip"`
Port int `json:"port"`
}
type ServerID struct {
Type string `json:"@type"`
Key string `json:"key"`
}
type ValidatorConfig struct {
Type string `json:"@type"`
ZeroState ConfigBlock `json:"zero_state"`
InitBlock ConfigBlock `json:"init_block"`
Hardforks []ConfigBlock `json:"hardforks"`
}
type ConfigBlock struct {
Workchain int32 `json:"workchain"`
Shard int64 `json:"shard"`
SeqNo uint32 `json:"seqno"`
RootHash []byte `json:"root_hash"`
FileHash []byte `json:"file_hash"`
}