From 773b6af8535756c206473790bff11087ef842c0b Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Sat, 20 May 2023 11:55:43 +0800 Subject: [PATCH] remove unnecessary cmp --- common/random.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/random.go b/common/random.go index 24a8d7c7..5135b869 100644 --- a/common/random.go +++ b/common/random.go @@ -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 } }