-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.go
More file actions
40 lines (36 loc) · 1.64 KB
/
config.go
File metadata and controls
40 lines (36 loc) · 1.64 KB
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
package config
import "github.com/multiversx/mx-chain-go/config"
// Config will hold the whole config file's data
type Config struct {
Config struct {
Simulator struct {
ServerPort int `toml:"server-port"`
NumOfShards int `toml:"num-of-shards"`
RoundsPerEpoch int `toml:"rounds-per-epoch"`
SupernovaRoundsPerEpoch int `toml:"supernova-rounds-per-epoch"`
RoundDurationInMs int `toml:"round-duration-in-milliseconds"`
SupernovaRoundDurationInMs int `toml:"supernova-round-duration-in-milliseconds"`
InitialRound int64 `toml:"initial-round"`
InitialNonce uint64 `toml:"initial-nonce"`
InitialEpoch uint32 `toml:"initial-epoch"`
MxChainRepo string `toml:"mx-chain-go-repo"`
MxProxyRepo string `toml:"mx-chain-proxy-go-repo"`
} `toml:"simulator"`
Logs struct {
LogFileLifeSpanInMB int `toml:"log-file-life-span-in-mb"`
LogFileLifeSpanInSec int `toml:"log-file-life-span-in-sec"`
LogFilePrefix string `toml:"log-file-prefix"`
LogsPath string `toml:"logs-path"`
} `toml:"logs"`
BlocksGenerator BlocksGeneratorConfig `toml:"blocks-generator"`
} `toml:"config"`
}
// BlocksGeneratorConfig defined the configuration for the blocks generator
type BlocksGeneratorConfig struct {
AutoGenerateBlocks bool `toml:"auto-generate-blocks"`
BlockTimeInMs uint64 `toml:"block-time-in-milliseconds"`
}
// OverrideConfigs defines the struct used for the overridable configs
type OverrideConfigs struct {
OverridableConfigTomlValues []config.OverridableConfig
}