Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ethereum_spec_tools/evm_tools/t8n/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ def __init__(self, t8n: "T8N", stdin: Optional[Dict] = None):
with open(t8n.options.input_env, "r") as f:
data = json.load(f)

if "parentHash" not in data:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather avoid cases like this. They tend to accumulate over time and make the command-line interface less straightforward.

Can we fix EEST to add the --state-test flag?

# Sometimes we are given a state test without the --state-test
# flag being set. This hack detects those cases and treats them
# as state tests.
t8n.options.state_test = True

self.coinbase = t8n.fork.hex_to_address(data["currentCoinbase"])
self.block_gas_limit = parse_hex_or_int(data["currentGasLimit"], Uint)
self.block_number = parse_hex_or_int(data["currentNumber"], Uint)
Expand Down