From 5a1fc12479417c5bcd15a0a2558dfe67b3eb3e46 Mon Sep 17 00:00:00 2001 From: Konrad Feldmeier Date: Mon, 11 Jul 2016 08:12:02 +0200 Subject: [PATCH] Workaround for issue #390 --- ethereum/testutils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ethereum/testutils.py b/ethereum/testutils.py index 367517b0a..482fcd55c 100644 --- a/ethereum/testutils.py +++ b/ethereum/testutils.py @@ -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 @@ -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