Skip to content

Commit

Permalink
Use dash-separated flags for minimus gas prices
Browse files Browse the repository at this point in the history
Ref #3241
  • Loading branch information
Alessio Treglia committed Jan 23, 2019
1 parent e017941 commit b4f3a99
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/gaia/cli_test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestGaiaCLIMinimumFees(t *testing.T) {
// start gaiad server with minimum fees
minGasPrice, _ := sdk.NewDecFromStr("0.000006")
fees := fmt.Sprintf(
"--minimum_gas_prices=%s,%s",
"--minimum-gas-prices=%s,%s",
sdk.NewDecCoinFromDec(feeDenom, minGasPrice),
sdk.NewDecCoinFromDec(fee2Denom, minGasPrice),
)
Expand Down Expand Up @@ -87,7 +87,7 @@ func TestGaiaCLIGasPrices(t *testing.T) {

// start gaiad server with minimum fees
minGasPrice, _ := sdk.NewDecFromStr("0.000006")
proc := f.GDStart(fmt.Sprintf("--minimum_gas_prices=%s", sdk.NewDecCoinFromDec(feeDenom, minGasPrice)))
proc := f.GDStart(fmt.Sprintf("--minimum-gas-prices=%s", sdk.NewDecCoinFromDec(feeDenom, minGasPrice)))
defer proc.Stop(false)

barAddr := f.KeyAddress(keyBar)
Expand Down Expand Up @@ -120,7 +120,7 @@ func TestGaiaCLIFeesDeduction(t *testing.T) {

// start gaiad server with minimum fees
minGasPrice, _ := sdk.NewDecFromStr("0.000006")
proc := f.GDStart(fmt.Sprintf("--minimum_gas_prices=%s", sdk.NewDecCoinFromDec(feeDenom, minGasPrice)))
proc := f.GDStart(fmt.Sprintf("--minimum-gas-prices=%s", sdk.NewDecCoinFromDec(feeDenom, minGasPrice)))
defer proc.Stop(false)

// Save key addresses for later use
Expand Down
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type BaseConfig struct {
// The minimum gas prices a validator is willing to accept for processing a
// transaction. A transaction's fees must meet the minimum of each denomination
// specified in this config (e.g. 0.01photino,0.0001stake).
MinGasPrices string `mapstructure:"minimum_gas_prices"`
MinGasPrices string `mapstructure:"minimum-gas-prices"`
}

// Config defines the server's top level configuration
Expand Down
2 changes: 1 addition & 1 deletion server/config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const defaultConfigTemplate = `# This is a TOML config file.
# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of each denomination
# specified in this config (e.g. 0.01photino,0.0001stake).
minimum_gas_prices = "{{ .BaseConfig.MinGasPrices }}"
minimum-gas-prices = "{{ .BaseConfig.MinGasPrices }}"
`

var configTemplate *template.Template
Expand Down
2 changes: 1 addition & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
flagAddress = "address"
flagTraceStore = "trace-store"
flagPruning = "pruning"
FlagMinGasPrices = "minimum_gas_prices"
FlagMinGasPrices = "minimum-gas-prices"
)

// StartCmd runs the service passed in, either stand-alone or in-process with
Expand Down

0 comments on commit b4f3a99

Please sign in to comment.