Properly Use Demo Config (#3494)

This commit is contained in:
Raul Jordan 2019-09-16 14:55:30 -05:00 committed by terence tsao
parent c9f48373cb
commit 9683a83750
2 changed files with 6 additions and 0 deletions

View File

@ -83,8 +83,10 @@ func NewBeaconNode(ctx *cli.Context) (*BeaconNode, error) {
if !ctx.GlobalBool(flags.NoCustomConfigFlag.Name) {
log.Info("Using custom parameter configuration")
if featureconfig.FeatureConfig().DemoConfig {
log.Info("Using demo config")
params.UseDemoBeaconConfig()
} else {
log.Info("Using minimal config")
params.UseMinimalConfig()
}
}

View File

@ -57,6 +57,10 @@ func InitFeatureConfig(c *FeatureFlagConfig) {
// on what flags are enabled for the beacon-chain client.
func ConfigureBeaconFeatures(ctx *cli.Context) {
cfg := &FeatureFlagConfig{}
if ctx.GlobalBool(DemoConfigFlag.Name) {
log.Warn("Using demo config")
cfg.DemoConfig = true
}
if ctx.GlobalBool(NoGenesisDelayFlag.Name) {
log.Warn("Using non standard genesis delay. This may cause problems in a multi-node environment.")
cfg.NoGenesisDelay = true