Skip to content

Commit

Permalink
fix: f3 gen power command being non-deterministic (#12764)
Browse files Browse the repository at this point in the history
Sort the power table before Selecting from it.
  • Loading branch information
Kubuxu authored and rjan90 committed Dec 13, 2024
1 parent 9dac6b0 commit 6eebd30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/lotus-shed/f3.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ var f3GenExplicitPower = &cli.Command{
for _, pe := range powerMap {
powerList = append(powerList, pe)
}
sort.Sort(powerList)
rng.Shuffle(len(powerList), powerList.Swap)

iteration := cctx.Int("iteration")
Expand Down

0 comments on commit 6eebd30

Please sign in to comment.