From b426948b966405b65f3ea6c1994164b462980694 Mon Sep 17 00:00:00 2001 From: Bitflash Date: Sat, 1 Aug 2026 12:44:04 -0300 Subject: mine: remember whether this node was mining, with the command line winning (#84) --- src/gui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui.cpp') diff --git a/src/gui.cpp b/src/gui.cpp index db6b69e..e2bb5cf 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -795,6 +795,13 @@ static void DrawOptionsDialog() if (!vfThreadRunning[3]) StartMinerThreads(); } + // Remember the choice. Without this the node came back from every + // restart as a plain relay, and a machine that had been mining for + // days looked identical to one that had never been asked to. + CWalletDB().WriteSetting("nMineMode", nMineMode); + CWalletDB().WriteSetting("fGenerateBitcoins", fGenerateBitcoins); + CWalletDB().WriteSetting("strParticipantPool", strParticipantPool); + if (nMineMode == MINE_OPERATOR) { if (!gPoolServerRunning) { gPoolServerRunning = true; -- cgit v1.2.3