diff options
author | Martin Holst Swende <martin@swende.se> | 2019-02-04 22:26:21 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2019-02-04 22:26:21 +0800 |
commit | a0fd4b7e578ce6b4aeb4bb7909618abaff373afc (patch) | |
tree | 98b91e0df8db2f283da77518b5e12bba0cda3317 /core/vm | |
parent | 822dc1bfb1cfade4c69a053436cda954763db1ab (diff) | |
download | go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.tar go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.tar.gz go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.tar.bz2 go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.tar.lz go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.tar.xz go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.tar.zst go-tangerine-a0fd4b7e578ce6b4aeb4bb7909618abaff373afc.zip |
core/vm: unshadow err to make it visible in tracers(#18504)
Diffstat (limited to 'core/vm')
-rw-r--r-- | core/vm/interpreter.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 952d96dd4..c9dc3c00c 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -182,6 +182,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) ( pcCopy uint64 // needed for the deferred Tracer gasCopy uint64 // for Tracer to log gas remaining before execution logged bool // deferred Tracer should ignore already logged steps + res []byte // result of the opcode execution function ) contract.Input = input @@ -216,11 +217,11 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) ( if !operation.valid { return nil, fmt.Errorf("invalid opcode 0x%x", int(op)) } - if err := operation.validateStack(stack); err != nil { + if err = operation.validateStack(stack); err != nil { return nil, err } // If the operation is valid, enforce and write restrictions - if err := in.enforceRestrictions(op, operation, stack); err != nil { + if err = in.enforceRestrictions(op, operation, stack); err != nil { return nil, err } @@ -254,7 +255,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) ( } // execute the operation - res, err := operation.execute(&pc, in, contract, mem, stack) + res, err = operation.execute(&pc, in, contract, mem, stack) // verifyPool is a build flag. Pool verification makes sure the integrity // of the integer pool by comparing values to a default value. if verifyPool { |