fix test_vm_json

This commit is contained in:
andri lim 2019-03-20 12:22:55 +07:00
parent a02cbdd91b
commit 17c95f3f82
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 7 additions and 8 deletions

View File

@ -7,13 +7,9 @@
import
unittest, strformat, strutils, sequtils, tables, json, ospaths, times,
byteutils, ranges/typedranges,
eth/[rlp, common], eth/trie/db,
./test_helpers,
../nimbus/[constants, errors],
../nimbus/[vm_state, vm_types],
../nimbus/utils,
../nimbus/vm/interpreter,
byteutils, ranges/typedranges, eth/[rlp, common], eth/trie/db,
./test_helpers, ../nimbus/vm/interpreter,
../nimbus/[constants, errors, vm_state, vm_types, utils],
../nimbus/db/[db_chain, state_db]
proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus)
@ -60,7 +56,10 @@ proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus) =
createAddress = toAddress))
var computation = newBaseComputation(vmState, header.blockNumber, message)
computation.executeOpcodes()
try:
computation.executeOpcodes()
except VMError:
computation.error = Error(info: getCurrentExceptionMsg())
if not fixture{"post"}.isNil:
# Success checks