Skip to content

Commit

Permalink
Add Chain Config File for Validator (#5751)
Browse files Browse the repository at this point in the history
* builds for config file
  • Loading branch information
rauljordan authored May 5, 2020
1 parent f29ea77 commit 840bfc5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions validator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ var appFlags = []cli.Flag{
debug.TraceFlag,
cmd.LogFileName,
cmd.ConfigFileFlag,
cmd.ChainConfigFileFlag,
}

func init() {
Expand Down
1 change: 1 addition & 0 deletions validator/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ go_library(
"//shared/cmd:go_default_library",
"//shared/debug:go_default_library",
"//shared/featureconfig:go_default_library",
"//shared/params:go_default_library",
"//shared/prometheus:go_default_library",
"//shared/tracing:go_default_library",
"//shared/version:go_default_library",
Expand Down
6 changes: 6 additions & 0 deletions validator/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/prysmaticlabs/prysm/shared/cmd"
"github.com/prysmaticlabs/prysm/shared/debug"
"github.com/prysmaticlabs/prysm/shared/featureconfig"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/prometheus"
"github.com/prysmaticlabs/prysm/shared/tracing"
"github.com/prysmaticlabs/prysm/shared/version"
Expand Down Expand Up @@ -67,6 +68,11 @@ func NewValidatorClient(ctx *cli.Context) (*ValidatorClient, error) {
stop: make(chan struct{}),
}

if ctx.IsSet(cmd.ChainConfigFileFlag.Name) {
chainConfigFileName := ctx.String(cmd.ChainConfigFileFlag.Name)
params.LoadChainConfigFile(chainConfigFileName)
}

featureconfig.ConfigureValidator(ctx)

keyManager, err := selectKeyManager(ctx)
Expand Down
1 change: 1 addition & 0 deletions validator/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var appHelpFlagGroups = []flagGroup{
cmd.LogFormat,
cmd.LogFileName,
cmd.ConfigFileFlag,
cmd.ChainConfigFileFlag,
},
},
{
Expand Down

0 comments on commit 840bfc5

Please sign in to comment.