Skip to content

Commit

Permalink
remove unnecessary cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu committed May 20, 2023
1 parent afbe264 commit 773b6af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func GetRandomPositiveInt(lessThan *big.Int) *big.Int {
var try *big.Int
for {
try = MustGetRandomInt(lessThan.BitLen())
if try.Cmp(lessThan) < 0 && try.Cmp(zero) >= 0 {
if try.Cmp(lessThan) < 0 {
break
}
}
Expand Down

0 comments on commit 773b6af

Please sign in to comment.