Skip to content

Commit

Permalink
Merge PR cosmos#3364: Use dash-separated flags for minimus gas prices
Browse files Browse the repository at this point in the history
alessio authored and cwgoes committed Jan 24, 2019
1 parent 0043912 commit ee33d82
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
@@ -113,6 +113,7 @@ IMPROVEMENTS
* Validators specify minimum gas prices instead of minimum fees
* Clients may provide either fees or gas prices directly
* The gas prices of a tx must meet a validator's minimum
* `gaiad start` and `gaia.toml` take --minimum-gas-prices flag and minimum-gas-price config key respectively.
* [\#2859](https://github.com/cosmos/cosmos-sdk/issues/2859) Rename `TallyResult` in gov proposals to `FinalTallyResult`
* [\#3286](https://github.com/cosmos/cosmos-sdk/pull/3286) Fix `gaiad gentx` printout of account's addresses, i.e. user bech32 instead of hex.

6 changes: 3 additions & 3 deletions cmd/gaia/cli_test/cli_test.go
Original file line number Diff line number Diff line change
@@ -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),
)
@@ -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)
@@ -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
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion server/config/toml.go
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion server/start.go
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ee33d82

Please sign in to comment.