Skip to content

Commit

Permalink
add MinGasPrices check in interceptConfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberbono3 committed May 21, 2021
1 parent ef14cc8 commit c5b8a52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ which accepts a path for the resulting pprof file.
serverCtx.Logger.Info("starting ABCI without Tendermint")
return startStandAlone(serverCtx, appCreator)
}

if flagMinGasPricesStr, _ := cmd.Flags().GetString(FlagMinGasPrices); flagMinGasPricesStr == "" {
return fmt.Errorf("FlagMinGasPrices must not be empty")
}


serverCtx.Logger.Info("starting ABCI with Tendermint")

// amino is needed here for backwards compatibility of REST routes
Expand Down
5 changes: 5 additions & 0 deletions server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,15 @@ func interceptConfigs(rootViper *viper.Viper) (*tmcfg.Config, error) {
if err != nil {
return nil, fmt.Errorf("failed to parse %s: %w", appCfgFilePath, err)
}
// TODO manual testing with config
if appConf.MinGasPrices == ""{
return nil, fmt.Errorf("MinGasPrices is empty in %s", appCfgFilePath)
}

config.WriteConfigFile(appCfgFilePath, appConf)
}


rootViper.SetConfigType("toml")
rootViper.SetConfigName("app")
rootViper.AddConfigPath(configPath)
Expand Down

0 comments on commit c5b8a52

Please sign in to comment.