Skip to content

Commit

Permalink
Convert gas to constant in make_VMTests.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jun 12, 2020
1 parent 3446e21 commit cc97a38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/auto_generators/make_VMTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
git clone https://github.com/ethereum/tests --depth=1
## Get help
python make_VMTest.py --help
python make_VMTests.py --help
## Generate concrete tests:
for i in tests/BlockchainTests/ValidBlocks/VMTests/*/*json; do python make_VMTest.py -i $i --fork Istanbul -o ethereum_vm/VMTests_concrete; done
for i in tests/BlockchainTests/ValidBlocks/VMTests/*/*.json; do python make_VMTests.py -i $i --fork Istanbul -o ethereum_vm/VMTests_concrete; done
"""
import argparse
Expand Down Expand Up @@ -66,6 +66,7 @@ def gen_header(testcases):
import unittest
from binascii import unhexlify
from manticore import ManticoreEVM, Plugin
from manticore.core.smtlib import to_constant
from manticore.utils import config
'''

Expand Down Expand Up @@ -214,7 +215,7 @@ def did_close_transaction_callback(self, state, tx):
body += f"""
for state in m.all_states:
world = state.platform
self.assertEqual(used_gas_plugin.used_gas, {blockheader['gasUsed']})
self.assertEqual(to_constant(used_gas_plugin.used_gas), {blockheader['gasUsed']})
world.end_block()"""

Expand Down

0 comments on commit cc97a38

Please sign in to comment.