qt: persist Mining tab pool settings across restarts (QSettings) #66
Labels
No labels
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SubGeniusFinance/Offerings-to-Cthulhu#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out of #8, which closes with the Stratum client complete.
The Mining tab's pool section reads its fields fresh on every launch: the endpoint arrives prefilled with
pool.23skidoo.info:3040, the pay-to address and thread count start empty. Nothing is written back. A worshipper who points the client at a different pool, or who mines to an address other than the wallet default, retypes both every time the client starts.That lands on exactly the audience pool mode was built for. Solo mining's Poisson variance was the reason for the whole feature — the casual who gives up after four hours of no blocks is the same casual who gives up after typing a Q-address for the third night running.
Scope
Persist and restore the three pool-mode fields through
QSettings, alongside how the rest of the client stores its options:host:port)Notes
src/qt/forms/rpcconsole.ui; handlers insrc/qt/rpcconsole.cpp(0a0f3ccb).pool.23skidoo.info:3040as the fallback when no value has been stored — a fresh wallet should still have a working endpoint in the box.mining.authorize.Where this lives
feat/issue-8-mining-tab-soloonly. Per maintainer decision the mining lineage never merges tomain— stock releases stay lean. CI force-pushes this branch on every push tomain, so pull before committing.Done when
Set endpoint, address, and threads; restart the client; all three come back as entered, and mining does not start on its own.
Invalid — this was already implemented in
0a0f3ccb("qt: Mining tab pool mode — The Communal Rite"), which is the same commit that added the pool section. Closing.Restore runs in the
RPCConsoleconstructor (src/qt/rpcconsole.cpp:255-269), under the comment "restore last-used settings; reflect a client already started via -stratum/-stratumuser command-line args":poolMiningEndpoint— defaults topool.23skidoo.info:3040when unset, exactly the fallback this issue asked forpoolMiningAddress— defaults emptypoolMiningThreads—qBound(1, saved, idealThreadCount()), so a hand-edited config can't exceed the machineWrite-back is at
rpcconsole.cpp:681-683, placed deliberately afterStartStratum()returns success — only settings that actually brought up a client get persisted, so a failed endpoint never becomes the saved default.The other two acceptance criteria hold as well. Values restore through the same widgets that feed the
host:portandQ-address validation inon_poolMiningToggle_clicked(), so a hand-edited config still can't reachmining.authorizemalformed. And nothing auto-starts: the constructor only checks the toggle wheng_pStratumClientis already running from-stratumargs orsetstratum— a stored endpoint alone does not begin the rite.Verified in the shipped artifact too.
stringsonOfferings-qt.exefromOfferings-miningtab-private-20260807-151900-win64.zip(built atwallet-mining-ef3672f) containspoolMiningEndpoint,poolMiningAddress, andpoolMiningThreads— the public Windows build persists pool settings today.My error when filing: I grepped for
QSettingson the same line as pool/stratum/mining, and the declarationQSettings settings;sits on a line of its own. Nothing was missing from #8.