diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-26 16:59:08 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:19 +0800 |
commit | 2b4a537e21e3c2d0e3f31dec6cea60e31125db66 (patch) | |
tree | c698eeaf5c37b6f1cb5c163184dae2d35110a989 /core | |
parent | de6031e18c5a134fc6a4d72fdd1237201e42b720 (diff) | |
download | go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar.gz go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar.zst go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.zip |
core: vm: fix power2 table calculation (#50)
Diffstat (limited to 'core')
-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) } } |