Skip to content

Commit

Permalink
fix: Don't error on startup if min-gas-price is empty (cosmos#9621)
Browse files Browse the repository at this point in the history
* fix: Don't error on startup if min-gas-price is empty

* remove test

* Update server/start.go

* Update server/start.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Switch to error

Co-authored-by: Aaron Craelius <aaron@regen.network>
  • Loading branch information
2 people authored and zakir committed Apr 13, 2022
1 parent 16e5cb4 commit 73f0b2c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
return err
}

config := config.GetConfig(ctx.Viper)
if err := config.ValidateBasic(); err != nil {
ctx.Logger.Error("WARNING: The minimum-gas-prices config in app.toml is set to the empty string. " +
"This defaults to 0 in the current version, but will error in the next version " +
"(SDK v0.44). Please explicitly put the desired minimum-gas-prices in your app.toml.")
}

app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper)

nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile())
Expand Down Expand Up @@ -261,8 +268,6 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
}
ctx.Logger.Debug("initialization: tmNode started")

config := config.GetConfig(ctx.Viper)

// Add the tx service to the gRPC router. We only need to register this
// service if API or gRPC is enabled, and avoid doing so in the general
// case, because it spawns a new local tendermint RPC client.
Expand Down

0 comments on commit 73f0b2c

Please sign in to comment.