aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/instructions.go
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2018-09-04 16:49:18 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-04 16:49:18 +0800
commit32f28a9360d26a661d55915915f12fd3c70f012b (patch)
tree870134b45677ea479b6fca7983d48eb362c12b4d /core/vm/instructions.go
parent6a33954731658667056466bf7573ed1c397f4750 (diff)
downloaddexon-32f28a9360d26a661d55915915f12fd3c70f012b.tar
dexon-32f28a9360d26a661d55915915f12fd3c70f012b.tar.gz
dexon-32f28a9360d26a661d55915915f12fd3c70f012b.tar.bz2
dexon-32f28a9360d26a661d55915915f12fd3c70f012b.tar.lz
dexon-32f28a9360d26a661d55915915f12fd3c70f012b.tar.xz
dexon-32f28a9360d26a661d55915915f12fd3c70f012b.tar.zst
dexon-32f28a9360d26a661d55915915f12fd3c70f012b.zip
core/vm, tests: update tests, enable constantinople statetests, fix SAR opcode (#17538)
This commit does a few things at once: - Updates the tests to contain the latest data from ethereum/tests repo. - Enables Constantinople state tests. This is needed to be able to fuzz-test the evm with constantinople rules. - Fixes the error in opSAR that we've known about for some time. I was kind of saving it to see if we hit upon it with the random test generator, but it's difficult to both enable the tests and have the bug there -- we don't want to forget about it, so maybe it's better to just fix it.
Diffstat (limited to 'core/vm/instructions.go')
-rw-r--r--core/vm/instructions.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/vm/instructions.go b/core/vm/instructions.go
index b7742e655..ca9e775ac 100644
--- a/core/vm/instructions.go
+++ b/core/vm/instructions.go
@@ -355,7 +355,7 @@ func opSAR(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *
defer interpreter.intPool.put(shift) // First operand back into the pool
if shift.Cmp(common.Big256) >= 0 {
- if value.Sign() > 0 {
+ if value.Sign() >= 0 {
value.SetUint64(0)
} else {
value.SetInt64(-1)