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

Commit c1ef067

Browse files
committed
Workaround for issue #390
1 parent 025d43b commit c1ef067

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ethereum/testutils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,13 @@ def run_vm_test(params, mode, profiler=None):
139139
number=parse_int_or_hex(env['currentNumber']),
140140
coinbase=decode_hex(env['currentCoinbase']),
141141
difficulty=parse_int_or_hex(env['currentDifficulty']),
142-
gas_limit=parse_int_or_hex(env['currentGasLimit']),
143-
timestamp=parse_int_or_hex(env['currentTimestamp']))
142+
timestamp=parse_int_or_hex(env['currentTimestamp']),
143+
# work around https://github.com/ethereum/pyethereum/issues/390 [1]
144+
gas_limit=min(2 ** 63 - 1, parse_int_or_hex(env['currentGasLimit'])))
145+
144146
blk = blocks.Block(header, env=db_env)
147+
# work around https://github.com/ethereum/pyethereum/issues/390 [2]
148+
blk.gas_limit = parse_int_or_hex(env['currentGasLimit'])
145149

146150
# setup state
147151
for address, h in list(pre.items()):

0 commit comments

Comments
 (0)