Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Workaround for issue #390
Browse files Browse the repository at this point in the history
  • Loading branch information
konradkonrad committed Jul 11, 2016
1 parent 025d43b commit 5a1fc12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ethereum/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def run_vm_test(params, mode, profiler=None):
difficulty=parse_int_or_hex(env['currentDifficulty']),
gas_limit=parse_int_or_hex(env['currentGasLimit']),
timestamp=parse_int_or_hex(env['currentTimestamp']))

blk = blocks.Block(header, env=db_env)

# setup state
Expand Down Expand Up @@ -291,10 +292,14 @@ def run_state_test(params, mode):
number=parse_int_or_hex(env['currentNumber']),
coinbase=decode_hex(env['currentCoinbase']),
difficulty=parse_int_or_hex(env['currentDifficulty']),
gas_limit=parse_int_or_hex(env['currentGasLimit']),
timestamp=parse_int_or_hex(env['currentTimestamp']))
timestamp=parse_int_or_hex(env['currentTimestamp']),
# work around https://github.com/ethereum/pyethereum/issues/390 [1]:
gas_limit=min(2 ** 63 - 1, parse_int_or_hex(env['currentGasLimit'])))
blk = blocks.Block(header, env=db_env)

# work around https://github.com/ethereum/pyethereum/issues/390 [2]:
blk.gas_limit = parse_int_or_hex(env['currentGasLimit'])

# setup state
for address, h in list(pre.items()):
assert len(address) == 40
Expand Down

0 comments on commit 5a1fc12

Please sign in to comment.