diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 8c68db848daf..bdd8ac3f9bda 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -526,7 +526,7 @@ func opJump(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt if !scope.Contract.validJumpdest(&pos) { return nil, ErrInvalidJump } - *pc = pos.Uint64() + *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop return nil, nil } @@ -536,9 +536,7 @@ func opJumpi(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by if !scope.Contract.validJumpdest(&pos) { return nil, ErrInvalidJump } - *pc = pos.Uint64() - } else { - *pc++ + *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop } return nil, nil } diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 7530ed693c28..7a30d60b3f3f 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -268,9 +268,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) ( if err != nil { break } - if !operation.jumps { - pc++ - } + pc++ } if err == errStopToken { diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index 967f7632e06e..f6023b617073 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -526,14 +526,12 @@ func newFrontierInstructionSet() JumpTable { constantGas: GasMidStep, minStack: minStack(1, 0), maxStack: maxStack(1, 0), - jumps: true, }, JUMPI: { execute: opJumpi, constantGas: GasSlowStep, minStack: minStack(2, 0), maxStack: maxStack(2, 0), - jumps: true, }, PC: { execute: opPc,