aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-11-26 16:59:08 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:19 +0800
commit2b4a537e21e3c2d0e3f31dec6cea60e31125db66 (patch)
treec698eeaf5c37b6f1cb5c163184dae2d35110a989 /core
parentde6031e18c5a134fc6a4d72fdd1237201e42b720 (diff)
downloadgo-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar
go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar.gz
go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar.bz2
go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar.lz
go-tangerine-2b4a537e21e3c2d0e3f31dec6cea60e31125db66.tar.xz
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.go6
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)
}
}