core/vm: implement REVERT metropolis opcode

This commit is contained in:
Jeffrey Wilcke
2017-08-16 15:32:59 +03:00
committed by Péter Szilágyi
parent 0b978f91b6
commit b70a73cd3e
4 changed files with 21 additions and 1 deletions

View File

@ -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: