Commit 018a5bb3 authored by protolambda's avatar protolambda

op-service: no need for ReadLocalCLIConfig anymore

parent 1a7a9147
......@@ -81,16 +81,6 @@ func DefaultCLIConfig() CLIConfig {
}
}
func ReadLocalCLIConfig(ctx *cli.Context) CLIConfig {
cfg := DefaultCLIConfig()
cfg.Level = ctx.String(LevelFlagName)
cfg.Format = ctx.String(FormatFlagName)
if ctx.IsSet(ColorFlagName) {
cfg.Color = ctx.Bool(ColorFlagName)
}
return cfg
}
func ReadCLIConfig(ctx *cli.Context) CLIConfig {
cfg := DefaultCLIConfig()
cfg.Level = ctx.String(LevelFlagName)
......
......@@ -62,11 +62,3 @@ func ReadCLIConfig(ctx *cli.Context) CLIConfig {
ListenPort: ctx.Int(PortFlagName),
}
}
func ReadLocalCLIConfig(ctx *cli.Context) CLIConfig {
return CLIConfig{
Enabled: ctx.Bool(EnabledFlagName),
ListenAddr: ctx.String(ListenAddrFlagName),
ListenPort: ctx.Int(PortFlagName),
}
}
......@@ -395,7 +395,7 @@ var (
FeeRecipientFlag, RandaoFlag, BlockTimeFlag, BuildingTime, AllowGaps,
}, oplog.CLIFlags(envVarPrefix)...), opmetrics.CLIFlags(envVarPrefix)...),
Action: EngineAction(func(ctx *cli.Context, client client.RPC) error {
logCfg := oplog.ReadLocalCLIConfig(ctx)
logCfg := oplog.ReadCLIConfig(ctx)
if err := logCfg.Check(); err != nil {
return fmt.Errorf("failed to parse log configuration: %w", err)
}
......@@ -404,7 +404,7 @@ var (
settings := ParseBuildingArgs(ctx)
// TODO: finalize/safe flag
metricsCfg := opmetrics.ReadLocalCLIConfig(ctx)
metricsCfg := opmetrics.ReadCLIConfig(ctx)
return opservice.CloseAction(func(ctx context.Context, shutdown <-chan struct{}) error {
registry := opmetrics.NewRegistry()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment