fix test_vm_json
This commit is contained in:
parent
a02cbdd91b
commit
17c95f3f82
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue