fix regression

This commit is contained in:
andri lim 2019-03-18 13:13:16 +07:00
parent cd765bf452
commit 4f6f564626
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 6 additions and 6 deletions

View File

@ -258,7 +258,7 @@ proc homesteadVM(computation: var BaseComputation) =
proc updateOpcodeExec*(computation: var BaseComputation, fork: Fork) =
case fork
of FkFrontier:
of FkFrontier..FkThawing:
computation.opCodeExec = frontierVM
computation.frontierVM()
of FkHomestead..FkSpurious:

View File

@ -115,14 +115,14 @@ proc traceOpCodeEnded*(tracer: var TransactionTracer, c: BaseComputation, op: Op
trace "Op", json = j.pretty()
proc traceError*(tracer: var TransactionTracer, c: BaseComputation) =
let j = tracer.trace["structLogs"].elems[^1]
if tracer.trace["structLogs"].elems.len > 0:
let j = tracer.trace["structLogs"].elems[^1]
j["error"] = %(c.error.info)
trace "Error", json = j.pretty()
# TODO: figure out how to get gasCost
# when contract execution failed before traceOpCodeEnded called
# because exception raised
#j["gasCost"] = %
j["error"] = %(c.error.info)
tracer.trace["failed"] = %true
trace "Error", json = j.pretty()

View File

@ -704,7 +704,7 @@
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"error": ""
"error": "Invalid instruction, received an opcode not implemented in the current fork."
}
]
},