Skip to content

Commit

Permalink
Update default historical header number for stargate (cosmos#8178)
Browse files Browse the repository at this point in the history
* Update default historical header number

* Update x/staking/types/params.go

Co-authored-by: Amaury <[email protected]>

* fix tests

* duh

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Amaury <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <[email protected]>
  • Loading branch information
5 people authored Dec 17, 2020
1 parent 731be71 commit 75bc312
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions x/staking/client/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,15 +858,15 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() {
"with text output",
[]string{fmt.Sprintf("--%s=text", tmcli.OutputFlag)},
`bond_denom: stake
historical_entries: 100
historical_entries: 10000
max_entries: 7
max_validators: 100
unbonding_time: 1814400s`,
},
{
"with json output",
[]string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
`{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":100,"bond_denom":"stake"}`,
`{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake"}`,
},
}
for _, tc := range testCases {
Expand Down
2 changes: 1 addition & 1 deletion x/staking/simulation/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestRandomizedGenState(t *testing.T) {

require.Equal(t, uint32(207), stakingGenesis.Params.MaxValidators)
require.Equal(t, uint32(7), stakingGenesis.Params.MaxEntries)
require.Equal(t, uint32(48), stakingGenesis.Params.HistoricalEntries)
require.Equal(t, uint32(8687), stakingGenesis.Params.HistoricalEntries)
require.Equal(t, "stake", stakingGenesis.Params.BondDenom)
require.Equal(t, float64(238280), stakingGenesis.Params.UnbondingTime.Seconds())
// check numbers of Delegations and Validators
Expand Down
2 changes: 1 addition & 1 deletion x/staking/simulation/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestParamChanges(t *testing.T) {
}{
{"staking/MaxValidators", "MaxValidators", "82", "staking"},
{"staking/UnbondingTime", "UnbondingTime", "\"275307000000000\"", "staking"},
{"staking/HistoricalEntries", "HistoricalEntries", "29", "staking"},
{"staking/HistoricalEntries", "HistoricalEntries", "9149", "staking"},
}

paramChanges := simulation.ParamChanges(r)
Expand Down
4 changes: 2 additions & 2 deletions x/staking/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const (
// Default maximum entries in a UBD/RED pair
DefaultMaxEntries uint32 = 7

// DefaultHistorical entries is 100. Apps that don't use IBC can ignore this
// DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this
// value by not adding the staking module to the application module manager's
// SetOrderBeginBlockers.
DefaultHistoricalEntries uint32 = 100
DefaultHistoricalEntries uint32 = 10000
)

var (
Expand Down

0 comments on commit 75bc312

Please sign in to comment.