Skip to content

Commit d27d674

Browse files
committed
Change eth-tester coinbase key back to miner
1 parent febd4ef commit d27d674

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

tests/integration/test_ethereum_tester.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -568,16 +568,6 @@ def test_eth_send_transaction_no_gas(self, eth_tester, w3, unlocked_account):
568568
def test_eth_send_transaction_no_max_fee(self, eth_tester, w3, unlocked_account):
569569
super().test_eth_send_transaction_no_max_fee(w3, unlocked_account)
570570

571-
def test_eth_get_balance_with_block_identifier(self, w3: "Web3") -> None:
572-
# in eth-tester we've changed 'mining' nomenclature to 'coinbase'
573-
coinbase_address = w3.eth.get_block(1)["coinbase"]
574-
genesis_balance = w3.eth.get_balance(coinbase_address, 0)
575-
later_balance = w3.eth.get_balance(coinbase_address, 1)
576-
577-
assert is_integer(genesis_balance)
578-
assert is_integer(later_balance)
579-
assert later_balance > genesis_balance
580-
581571
def test_eth_getBlockByNumber_safe(
582572
self, w3: "Web3", empty_block: BlockData
583573
) -> None:

web3/providers/eth_tester/middleware.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ def is_hexstr(value: Any) -> bool:
186186
"extra_data": "extraData",
187187
"gas_used": "gasUsed",
188188
"base_fee_per_gas": "baseFeePerGas",
189+
# eth-tester changed the miner key to coinbase since
190+
# there is no longer any mining happening, but the current
191+
# JSON-RPC spec still says miner
192+
"coinbase": "miner",
189193
}
190194
block_result_remapper = apply_key_map(BLOCK_RESULT_KEY_MAPPING)
191195

0 commit comments

Comments
 (0)