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