Skip to content

Commit 4aac916

Browse files
committed
Add mix_hash to the BLOCK_RESULTS_KEY_MAPPING from eth-tester
1 parent 3907e17 commit 4aac916

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/core/middleware/test_eth_tester_middleware.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ def test_get_block_formatters(w3):
3131
all_block_keys = set(BlockData.__annotations__.keys())
3232
latest_block_keys = set(latest_block.keys())
3333

34-
keys_diff = all_block_keys.difference(latest_block_keys)
35-
assert len(keys_diff) == 2
36-
# mixHash and miner not implemented in eth-tester
37-
assert keys_diff == set(["mixHash", "miner"])
34+
assert all_block_keys == latest_block_keys
3835

3936

4037
@pytest.mark.parametrize(

web3/providers/eth_tester/middleware.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def is_hexstr(value: Any) -> bool:
186186
"extra_data": "extraData",
187187
"gas_used": "gasUsed",
188188
"base_fee_per_gas": "baseFeePerGas",
189+
"mix_hash": "mixHash",
189190
# eth-tester changed the miner key to coinbase since
190191
# there is no longer any mining happening, but the current
191192
# JSON-RPC spec still says miner

0 commit comments

Comments
 (0)