refactor(staking)!: remove historical info (#20845)

Co-authored-by: Facundo <facundomedica@gmail.com>
This commit is contained in:
Marko
2024-07-05 09:28:49 +00:00
committed by GitHub
co-authored by Facundo
parent 25d2043909
commit b68eb39412
34 changed files with 2670 additions and 3456 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ func genMaxValidators(r *rand.Rand) (maxValidators uint32) {
// getHistEntries returns randomized HistoricalEntries between 0-100.
func getHistEntries(r *rand.Rand) uint32 {
return uint32(r.Intn(int(types.DefaultHistoricalEntries + 1)))
return uint32(r.Intn(int(0 + 1)))
}
// getKeyRotationFee returns randomized keyRotationFee between 10000-1000000.
@@ -64,7 +64,7 @@ func RandomizedGenState(simState *module.SimulationState) {
// NOTE: the slashing module need to be defined after the staking module on the
// NewSimulationManager constructor for this to work
simState.UnbondTime = unbondTime
params := types.NewParams(simState.UnbondTime, maxVals, 7, histEntries, simState.BondDenom, minCommissionRate, rotationFee)
params := types.NewParams(simState.UnbondTime, maxVals, 7, simState.BondDenom, minCommissionRate, rotationFee)
// validators & delegations
var (
+1 -1
View File
@@ -51,7 +51,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(8687), stakingGenesis.Params.HistoricalEntries)
require.Equal(t, uint32(0), 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