fix revert opcode

This commit is contained in:
andri lim 2019-04-22 16:32:50 +07:00
parent 13cd54a382
commit d8284f9330
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 2 additions and 0 deletions

View File

@ -813,6 +813,8 @@ op revert, inline = false, startPos, size:
computation.memory.extend(pos, len) computation.memory.extend(pos, len)
computation.output = computation.memory.read(pos, len) computation.output = computation.memory.read(pos, len)
# setError(msg, false) will signal cheap revert
computation.setError("REVERT opcode executed", false)
proc selfDestructImpl(computation: BaseComputation, beneficiary: EthAddress) = proc selfDestructImpl(computation: BaseComputation, beneficiary: EthAddress) =
## 0xff Halt execution and register account for later deletion. ## 0xff Halt execution and register account for later deletion.