diff options
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/big.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethutil/big.go b/ethutil/big.go index d4f6361e9..2ff1c72d8 100644 --- a/ethutil/big.go +++ b/ethutil/big.go @@ -62,14 +62,14 @@ func S256(x *big.Int) *big.Int { } } -func FirstBitSet(v *big.Int) *big.Int { +func FirstBitSet(v *big.Int) int { for i := 0; i < v.BitLen(); i++ { if v.Bit(i) > 0 { - return big.NewInt(int64(i)) + return i } } - return big.NewInt(int64(v.BitLen())) + return v.BitLen() } // Big to bytes |