From 376957bea420f89f1094f71aef6fbded953e9939 Mon Sep 17 00:00:00 2001 From: andri lim Date: Thu, 25 Apr 2019 20:49:23 +0700 Subject: [PATCH] clean up unused code --- nimbus/vm/computation.nim | 5 ----- nimbus/vm/interpreter/opcodes_impl.nim | 1 - 2 files changed, 6 deletions(-) diff --git a/nimbus/vm/computation.nim b/nimbus/vm/computation.nim index 249dea550..7e40df8f9 100644 --- a/nimbus/vm/computation.nim +++ b/nimbus/vm/computation.nim @@ -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) diff --git a/nimbus/vm/interpreter/opcodes_impl.nim b/nimbus/vm/interpreter/opcodes_impl.nim index 77d3e810a..76e5e9b31 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -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"