@@ -2,6 +2,7 @@ package cmd
22
33import (
44 "errors"
5+ "fmt"
56 "io"
67 "os"
78 "path/filepath"
@@ -40,7 +41,10 @@ import (
4041 "github.com/prometheus/client_golang/prometheus"
4142)
4243
43- const baseDenom = "upasg"
44+ const (
45+ baseDenom string = "upasg"
46+ defaultMinGasPrice int64 = 25
47+ )
4448
4549// NewRootCmd creates a new root command for simd. It is called once in the
4650// main function.
@@ -123,9 +127,9 @@ func initAppConfig() (string, interface{}) {
123127 // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their
124128 // own app.toml to override, or use this default value.
125129 //
126- // We set the min gas prices to 50 .
127- // Error will be thrown if srvCfg.MinGasPrices value is less than 50 .
128- srvCfg .MinGasPrices = "50" + baseDenom
130+ // We set the min gas prices to defaultMinGasPrice value .
131+ // Error will be thrown if srvCfg.MinGasPrices value is less than defaultMinGasPrice value .
132+ srvCfg .MinGasPrices = fmt . Sprintf ( "%d%s" , defaultMinGasPrice , baseDenom )
129133
130134 customAppConfig := CustomAppConfig {
131135 Config : * srvCfg ,
@@ -268,14 +272,15 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a
268272 wasmOpts = append (wasmOpts , wasmkeeper .WithVMCacheMetrics (prometheus .DefaultRegisterer ))
269273 }
270274
271- // validate minimum-gas-prices value is greater than or equal to 50
275+ // validate minimum-gas-prices value is greater than or equal to defaultMinGasPrice value
272276 minGasPricesStr := cast .ToString (appOpts .Get (server .FlagMinGasPrices ))
273277 minGasPrices , err := sdk .ParseDecCoins (minGasPricesStr )
274278 if err != nil {
275279 panic (err )
276280 }
277- if minGasPrices .AmountOf (baseDenom ).LT (sdk .NewDec (50 )) {
278- panic ("minimum-gas-prices value in app.toml should be greater than or equal to 50" + baseDenom )
281+ if minGasPrices .AmountOf (baseDenom ).LT (sdk .NewDec (defaultMinGasPrice )) {
282+ panic (fmt .Sprintf ("minimum-gas-prices value in app.toml should be greater than or equal to %d%s" ,
283+ defaultMinGasPrice , baseDenom ))
279284 }
280285
281286 return app .NewPassageApp (
0 commit comments