diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-26 16:59:08 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:54 +0800 |
commit | c6d5de8864468f448d67b43a1a78ef04e643231e (patch) | |
tree | 1ddc841993eda00becb3bce16108aff5727042d8 | |
parent | b77acf8ef9f095183b1b4780bc9c57673971ce15 (diff) | |
download | dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.tar dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.tar.gz dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.tar.bz2 dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.tar.lz dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.tar.xz dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.tar.zst dexon-c6d5de8864468f448d67b43a1a78ef04e643231e.zip |
core: vm: fix power2 table calculation (#50)
-rw-r--r-- | core/vm/instructions.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 499e066f7..3a82190da 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -43,10 +43,10 @@ var ( ) func init() { - cur := int64(1) + cur := big.NewInt(1) for i := 0; i < 256; i++ { - power2[i] = big.NewInt(cur) - cur <<= 1 + power2[i] = new(big.Int).Set(cur) + cur = new(big.Int).Mul(cur, big2) } } |