diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-08-16 20:32:59 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-16 20:32:59 +0800 |
commit | b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3 (patch) | |
tree | 48364d1e6576be345fb97e44afb3d5c00eb7e9ac /core/vm/interpreter.go | |
parent | 0b978f91b6adcc4b595391096a72db73bc625bcf (diff) | |
download | go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.tar go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.tar.gz go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.tar.bz2 go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.tar.lz go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.tar.xz go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.tar.zst go-tangerine-b70a73cd3e49e249a9ab2c41c2dd268786dcd1a3.zip |
core/vm: implement REVERT metropolis opcode
Diffstat (limited to 'core/vm/interpreter.go')
-rw-r--r-- | core/vm/interpreter.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 954839f2e..23f930e91 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -209,6 +209,10 @@ func (in *Interpreter) Run(snapshot int, contract *Contract, input []byte) (ret if verifyPool { verifyIntegerPool(in.intPool) } + // checks whether the operation should revert state. + if operation.reverts { + in.evm.StateDB.RevertToSnapshot(snapshot) + } switch { case err != nil: |