clean up unused code

This commit is contained in:
andri lim 2019-04-25 20:49:23 +07:00
parent 3ccd1b1ee9
commit 376957bea4
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 0 additions and 6 deletions

View File

@ -172,11 +172,6 @@ template continuation*(comp: BaseComputation, body: untyped) =
proc postExecuteVM(computation: BaseComputation, opCode: static[Op]) {.gcsafe.} =
when opCode == Create:
#if computation.instr == Revert:
# assert(computation.isError)
# computation.gasMeter.resetGas()
# computation.error.erasesReturnData = true
if computation.isSuccess:
let fork = computation.getFork
let contractFailed = not computation.writeContract(fork)

View File

@ -809,7 +809,6 @@ op returnOp, inline = false, startPos, size:
op revert, inline = false, startPos, size:
## 0xfd, Halt execution reverting state changes but returning data and remaining gas.
let (pos, len) = (startPos.cleanMemRef, size.cleanMemRef)
#computation.gasMeter.resetGas()
computation.gasMeter.consumeGas(
computation.gasCosts[Revert].m_handler(computation.memory.len, pos, len),
reason = "REVERT"