Skip to content

Commit 995750c

Browse files
committed
Remove geth.miner and any references to it.
1 parent c6db197 commit 995750c

File tree

10 files changed

+1
-130
lines changed

10 files changed

+1
-130
lines changed

tests/core/txpool-module/test_txpool_content.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
def test_txpool_content(web3_empty):
99
web3 = web3_empty
1010

11-
web3.geth.miner.stop()
12-
1311
with Timeout(60) as timeout:
1412
while web3.eth.hashrate or web3.eth.mining:
1513
timeout.sleep(random.random())

tests/core/txpool-module/test_txpool_inspect.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
def test_txpool_inspect(web3_empty):
99
web3 = web3_empty
1010

11-
web3.geth.miner.stop()
12-
1311
with Timeout(60) as timeout:
1412
while web3.eth.hashrate or web3.eth.mining:
1513
timeout.sleep(random.random())

tests/integration/go_ethereum/test_goethereum_ws_v2/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _geth_command_arguments(ws_port, base_geth_command_arguments, geth_version):
2828
"--ws.port",
2929
ws_port,
3030
"--ws.api",
31-
"admin,eth,net,web3,personal,miner",
31+
"admin,eth,net,web3,personal",
3232
"--ws.origins",
3333
"*",
3434
"--ipcdisable",

web3/_utils/miner.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

web3/_utils/module_testing/module_testing_utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections import (
22
deque,
33
)
4-
import time
54
from typing import (
65
TYPE_CHECKING,
76
Any,
@@ -60,17 +59,6 @@
6059
flaky_geth_dev_mining = flaky(max_runs=3)
6160

6261

63-
def mine_pending_block(w3: "Web3") -> None:
64-
timeout = 10
65-
66-
w3.geth.miner.start() # type: ignore
67-
start = time.time()
68-
while time.time() < start + timeout:
69-
if len(w3.eth.get_block("pending")["transactions"]) == 0:
70-
break
71-
w3.geth.miner.stop() # type: ignore
72-
73-
7462
def assert_contains_log(
7563
result: Sequence[LogReceipt],
7664
block_with_txn_with_log: BlockData,

web3/_utils/rpc_abi.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,6 @@ class RPC:
114114
evm_revert = RPCEndpoint("evm_revert")
115115
evm_snapshot = RPCEndpoint("evm_snapshot")
116116

117-
# miner
118-
miner_makeDag = RPCEndpoint("miner_makeDag")
119-
miner_setExtra = RPCEndpoint("miner_setExtra")
120-
miner_setEtherbase = RPCEndpoint("miner_setEtherbase")
121-
miner_setGasPrice = RPCEndpoint("miner_setGasPrice")
122-
miner_start = RPCEndpoint("miner_start")
123-
miner_stop = RPCEndpoint("miner_stop")
124-
miner_startAutoDag = RPCEndpoint("miner_startAutoDag")
125-
miner_stopAutoDag = RPCEndpoint("miner_stopAutoDag")
126-
127117
# net
128118
net_listening = RPCEndpoint("net_listening")
129119
net_peerCount = RPCEndpoint("net_peerCount")

web3/geth.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@
2121
from web3._utils.compat import (
2222
Protocol,
2323
)
24-
from web3._utils.miner import (
25-
make_dag,
26-
set_etherbase,
27-
set_extra,
28-
set_gas_price,
29-
start,
30-
start_auto_dag,
31-
stop,
32-
stop_auto_dag,
33-
)
3424
from web3._utils.rpc_abi import (
3525
RPC,
3626
)
@@ -215,21 +205,6 @@ class GethAdmin(Module):
215205
)
216206

217207

218-
class GethMiner(Module):
219-
"""
220-
https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-miner
221-
"""
222-
223-
make_dag = make_dag
224-
set_extra = set_extra
225-
set_etherbase = set_etherbase
226-
set_gas_price = set_gas_price
227-
start = start
228-
stop = stop
229-
start_auto_dag = start_auto_dag
230-
stop_auto_dag = stop_auto_dag
231-
232-
233208
class Geth(Module):
234209
personal: GethPersonal
235210
admin: GethAdmin

web3/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
AsyncGethTxPool,
9696
Geth,
9797
GethAdmin,
98-
GethMiner,
9998
GethPersonal,
10099
GethTxPool,
101100
)
@@ -171,7 +170,6 @@ def get_default_modules() -> Dict[str, Union[Type[Module], Sequence[Any]]]:
171170
Geth,
172171
{
173172
"admin": GethAdmin,
174-
"miner": GethMiner,
175173
"personal": GethPersonal,
176174
"txpool": GethTxPool,
177175
},

web3/providers/eth_tester/defaults.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,6 @@ def personal_send_transaction(eth_tester: "EthereumTester", params: Any) -> HexS
404404
"writeBlockProfile": not_implemented,
405405
"writeMemProfile": not_implemented,
406406
},
407-
"miner": {
408-
"make_dag": not_implemented,
409-
"set_extra": not_implemented,
410-
"set_gas_price": not_implemented,
411-
"start": not_implemented,
412-
"stop": not_implemented,
413-
"start_auto_dag": not_implemented,
414-
"stop_auto_dag": not_implemented,
415-
},
416407
"personal": {
417408
"ec_recover": not_implemented,
418409
"import_raw_key": call_eth_tester("add_account"),

web3/providers/rpc/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
REQUEST_RETRY_ALLOWLIST = [
1515
"admin",
16-
"miner",
1716
"net",
1817
"txpool",
1918
"testing",

0 commit comments

Comments
 (0)