Skip to content

Commit

Permalink
epoching: smaller epoch interval in simulation (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: Akosh Farkash <aakoshh@gmail.com>
  • Loading branch information
SebastianElvis and aakoshh authored Jul 28, 2022
1 parent 8f94c83 commit 7e3e187
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/epoching/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (

// genUnbondingTime returns randomized UnbondingTime
func genEpochInterval(r *rand.Rand) uint64 {
return uint64(r.Intn(250) + 1)
return uint64(r.Intn(10) + 1)
}

// RandomizedGenState generates a random GenesisState for staking
Expand Down
2 changes: 1 addition & 1 deletion x/epoching/simulation/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestRandomizedGenState(t *testing.T) {
var epochingGenesis types.GenesisState
simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &epochingGenesis)

require.Equal(t, uint64(0x29), epochingGenesis.Params.EpochInterval)
require.Equal(t, uint64(0x1), epochingGenesis.Params.EpochInterval)
}

// TestRandomizedGenState1 tests abnormal scenarios of applying RandomizedGenState.
Expand Down

0 comments on commit 7e3e187

Please sign in to comment.