-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.go
61 lines (56 loc) · 1.52 KB
/
constants.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
package main
/*
MODIFY HERE THE CONSTANTS
Remember to replace the versions when the Mochimo node is updated!
*/
var Constants = ConstantType{
NetworkIdentifier: struct {
Blockchain string `json:"blockchain"`
Network string `json:"network"`
}{
Blockchain: "mochimo",
Network: "mainnet",
},
NetworkOptionsResponseVersion: struct {
RosettaVersion string `json:"rosetta_version"`
NodeVersion string `json:"node_version"`
MiddlewareVersion string `json:"middleware_version"`
}{
RosettaVersion: "1.4.13",
NodeVersion: "2.4.3",
MiddlewareVersion: "1.0.0",
},
}
// Constants for the server
var Globals = GlobalsType{
OnlineMode: false,
IsSynced: false,
LastSyncTime: 0,
LatestBlockNum: 0,
LatestBlockHash: [32]byte{},
GenesisBlockHash: [32]byte{},
CurrentBlockUnixMilli: 0,
SuggestedFee: 500,
}
type ConstantType struct {
NetworkIdentifier struct {
Blockchain string `json:"blockchain"`
Network string `json:"network"`
}
NetworkOptionsResponseVersion struct {
RosettaVersion string `json:"rosetta_version"`
NodeVersion string `json:"node_version"`
MiddlewareVersion string `json:"middleware_version"`
}
}
type GlobalsType struct {
OnlineMode bool
IsSynced bool
LastSyncTime uint64
LatestBlockNum uint64
LatestBlockHash [32]byte
GenesisBlockHash [32]byte
CurrentBlockUnixMilli uint64
SuggestedFee uint64
HashToBlockNumber map[string]uint32
}