aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/big.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-02 05:05:38 +0800
committerobscuren <geffobscura@gmail.com>2014-12-02 05:05:38 +0800
commita052357872217d5e99e7ee1a7a4b524b53addcdd (patch)
treee6b22d92ca0939a2d0a44bc04c6d83c600de23e7 /ethutil/big.go
parenta22056db5988bfa2b1354e0092eabb734c30701c (diff)
downloadgo-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.tar
go-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.tar.gz
go-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.tar.bz2
go-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.tar.lz
go-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.tar.xz
go-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.tar.zst
go-tangerine-a052357872217d5e99e7ee1a7a4b524b53addcdd.zip
Fixed EXP gas
Diffstat (limited to 'ethutil/big.go')
-rw-r--r--ethutil/big.go6
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