fix: non-determinism in auction sims (#432)

This commit is contained in:
Kevin Davis 2020-04-14 13:49:31 -04:00 committed by GitHub
parent 1fab788fd5
commit acc96952a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ func SimulateMsgPlaceBid(authKeeper auth.AccountKeeper, keeper auction.Keeper) s
}) })
// shuffle auctions slice so that bids are evenly distributed across auctions // shuffle auctions slice so that bids are evenly distributed across auctions
rand.Shuffle(len(openAuctions), func(i, j int) { r.Shuffle(len(openAuctions), func(i, j int) {
openAuctions[i], openAuctions[j] = openAuctions[j], openAuctions[i] openAuctions[i], openAuctions[j] = openAuctions[j], openAuctions[i]
}) })
// TODO do the same for accounts? // TODO do the same for accounts?