diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index b49c75c398..9136aef492 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -92,7 +92,10 @@ def test_admin_stopRPC(web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - pass + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/tests/integration/go_ethereum/test_goethereum_ipc.py b/tests/integration/go_ethereum/test_goethereum_ipc.py index 60e9b5e839..ec7747963d 100644 --- a/tests/integration/go_ethereum/test_goethereum_ipc.py +++ b/tests/integration/go_ethereum/test_goethereum_ipc.py @@ -62,7 +62,10 @@ def test_admin_peers(web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - pass + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index 62c9681e27..00f01dcb1c 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -97,7 +97,10 @@ def test_admin_stopWS(self, web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - pass + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index 623788e1e5..e8c5b364cb 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -466,8 +466,6 @@ def test_eth_replaceTransaction_non_existing_transaction( def test_eth_replaceTransaction_already_mined( self, web3: "Web3", unlocked_account_dual_type: ChecksumAddress ) -> None: - if 'v1.9.7' in web3.clientVersion: - web3.geth.miner.start() txn_params: TxParams = { 'from': unlocked_account_dual_type, 'to': unlocked_account_dual_type, @@ -481,8 +479,6 @@ def test_eth_replaceTransaction_already_mined( txn_params['gasPrice'] = Wei(web3.eth.gasPrice * 2) with pytest.raises(ValueError, match="Supplied transaction with hash"): web3.eth.replaceTransaction(txn_hash, txn_params) - if 'v1.9.7' in web3.clientVersion: - web3.geth.miner.stop() def test_eth_replaceTransaction_incorrect_nonce( self, web3: "Web3", unlocked_account: ChecksumAddress