Update default historical header number for stargate (#8178)

* Update default historical header number

* Update x/staking/types/params.go

Co-authored-by: Amaury <amaury.martiny@protonmail.com>

* fix tests

* duh

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
This commit is contained in:
Jack Zampolin 2020-12-17 11:50:03 -08:00 committed by GitHub
parent 731be71379
commit 75bc312ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -858,7 +858,7 @@ 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`,
@ -866,7 +866,7 @@ 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 {

View File

@ -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

View File

@ -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)

View File

@ -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 (