Repository navigation
Commit 6f40584
committed
Let the dashboard set mining cores and pause or resume mining
The Mining panel gets a cores slider (1 to the logical core count) and a pause or resume button. Applying calls miner_start(n) and saves n to <node-dir>/miner-threads, replaced atomically with its old permissions; while paused the count is only saved. Pause calls miner_stop and writes <node-dir>/mining-paused; resume removes it and starts mining on the saved count. After each change the node is read back with eth_mining and the outcome or error is shown in plain words. The new POST endpoints sit behind the dashboard key and the Origin check, and refuse a core count that is not a whole number in range. The page notes that a node restart resumes mining until the installer reads mining-paused.1 parent 3581a12 commit 6f40584
8 files changed
Lines changed: 804 additions & 0 deletions
File tree
- internal
- server
- status
- web
- static
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
0 commit comments