Skip to content

Commit

Permalink
fix(x/epochs): avoid invalid epoch duration in simulation (cosmos#20030)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Apr 12, 2024
1 parent 363a1e8 commit ce373b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/epochs/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// GenCommunityTax randomized CommunityTax
func GenDuration(r *rand.Rand) time.Duration {
return time.Hour * time.Duration(r.Intn(168)) // limit 1 week
return time.Hour * time.Duration(r.Intn(168)+1) // between 1 hour to 1 week
}

func RandomizedEpochs(r *rand.Rand) []types.EpochInfo {
Expand Down

0 comments on commit ce373b6

Please sign in to comment.