You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ce719f1
Browse filesBrowse the repository at this point in the historyBrowse files
Call miner_start with no parameters for the cores and resume controls
The node's miner_start takes no core count and its miner API offers no call to set one, so passing the count made it answer "Invalid number of input parameters" and both controls failed. Apply now saves the count to <node-dir>/miner-threads and starts the miner with no parameters; resume does the same. The page, the messages and the README say a new core count applies at the next node restart. The test node now refuses miner_start with any parameter, as the real node does.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,8 @@ The dashboard finds your blocks by reading the chain over IPC and keeps what it
41
41
42
42
The Mining panel has a cores slider, from 1 to the computer's logical core count, and a pause or resume button.
43
43
44
-
-**Apply**asks the node to mine on that many cores at once (`miner_start`) and saves the number in `<node-dir>/miner-threads`, the file the installer and updater read, so restarts and updates keep it. The file is replaced in one step (a temporary file renamed over it) and keeps its permissions. While mining is paused the number is only saved, and resuming uses it.
45
-
-**Pause** stops mining (`miner_stop`) and writes `<node-dir>/mining-paused`; the node keeps syncing. **Resume** removes that file and starts mining on the saved core count. Until the node installer reads `mining-paused`, a node restart resumes mining.
44
+
-**Apply** saves the number in `<node-dir>/miner-threads`, the file the installer and updater read, and makes sure the node is mining (`miner_start`, with no parameters). The node's `miner_start` takes no core count and its miner API has no call to set one, so the new count applies at the next node restart, and restarts and updates keep it. The file is replaced in one step (a temporary file renamed over it) and keeps its permissions. While mining is paused the number is only saved.
45
+
-**Pause** stops mining (`miner_stop`) and writes `<node-dir>/mining-paused`; the node keeps syncing. **Resume** removes that file and starts mining (`miner_start`, with no parameters) on the core count the node started with; a saved count applies at the next node restart. Until the node installer reads `mining-paused`, a node restart resumes mining.
46
46
47
47
After each change the dashboard reads the node back (`eth_mining`) and says in plain words what happened, or what went wrong. The controls are `POST /api/mining/cores` (body `{"cores": n}`, a whole number in range, else 400), `POST /api/mining/pause` and `POST /api/mining/resume`, behind the dashboard key and the Origin check.
res.Error=fmt.Sprintf("Saved %d cores for the next node restart, but the node did not start mining: %s.", n, nodeProblem(err))
82
86
res.Mining=readMining(ctx, node)
83
87
returnres
84
88
}
85
89
res.Mining=readMining(ctx, node)
86
-
res.OK, res.Message=miningOutcome(res.Mining, true, fmt.Sprintf("Mining on %d cores. Saved for restarts and updates.", n))
90
+
res.OK, res.Message=miningOutcome(res.Mining, true, fmt.Sprintf("Saved %d cores. They apply at the next node restart; until then the node keeps its current core count.", n))
<pclass="note">A new payout address applies at once and is saved in the node's <code>config.toml</code>, so restarts keep it. Only the address is needed: never enter a private key or recovery words here.</p>
87
-
<pclass="note">The core count is saved in the node folder, so restarts and updates keep it. While mining is paused the node keeps syncing. For now a node restart resumes mining, until the node installer learns to read the <code>mining-paused</code> file.</p>
87
+
<pclass="note">The core count is saved in the node folder and applies at the next node restart: the node cannot change it while running. Restarts and updates keep it. While mining is paused the node keeps syncing. For now a node restart resumes mining, until the node installer learns to read the <code>mining-paused</code> file.</p>
0 commit comments