diff options
| author | Bitflash <btf01@proton.me> | 2026-08-01 12:44:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 12:44:04 -0300 |
| commit | b426948b966405b65f3ea6c1994164b462980694 (patch) | |
| tree | f16357fe57bac2b6a6a8b61f1473e2861203cef1 /src/main.h | |
| parent | 24ed292f0524f1bc77c317b60d7ecf265596b3dd (diff) | |
mine: remember whether this node was mining, with the command line winning (#84)
Diffstat (limited to 'src/main.h')
| -rw-r--r-- | src/main.h | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -64,9 +64,8 @@ extern CBlockIndex* pindexBest; | |||
| 64 | extern unsigned int nTransactionsUpdated; | 64 | extern unsigned int nTransactionsUpdated; |
| 65 | extern string strSetDataDir; | 65 | extern string strSetDataDir; |
| 66 | extern int nDropMessagesTest; | 66 | extern int nDropMessagesTest; |
| 67 | // Mining mode -- persisted in wallet.dat | 67 | // Mining mode -- remembered in wallet.dat, but the command line always wins. |
| 68 | // Mining mode -- decided fresh every launch (CLI flags, else default). Never | 68 | // See LoadWallet() in db.cpp for why the precedence has to be explicit. |
| 69 | // restored from wallet.dat; see LoadWallet() in db.cpp. | ||
| 70 | // MINE_RELAY (0): default. Node runs/syncs, never mines, no pool server. | 69 | // MINE_RELAY (0): default. Node runs/syncs, never mines, no pool server. |
| 71 | // MINE_SOLO (1): mine to own wallet, no pool server | 70 | // MINE_SOLO (1): mine to own wallet, no pool server |
| 72 | // MINE_OPERATOR (2): run pool server, mine to own wallet, distribute to miners | 71 | // MINE_OPERATOR (2): run pool server, mine to own wallet, distribute to miners |
| @@ -76,6 +75,10 @@ extern int nDropMessagesTest; | |||
| 76 | #define MINE_OPERATOR 2 | 75 | #define MINE_OPERATOR 2 |
| 77 | #define MINE_PARTICIPANT 3 | 76 | #define MINE_PARTICIPANT 3 |
| 78 | extern int nMineMode; | 77 | extern int nMineMode; |
| 78 | // Set by the startup parser when a flag chose the mode. LoadWallet leaves the | ||
| 79 | // stored mode alone when this is true, so a flag is never silently overruled by | ||
| 80 | // something a previous session wrote. | ||
| 81 | extern bool fMineModeFromCommandLine; | ||
| 79 | extern string strParticipantPool; // participant: pool .btf address | 82 | extern string strParticipantPool; // participant: pool .btf address |
| 80 | extern string strPoolName; // operator: announced pool name | 83 | extern string strPoolName; // operator: announced pool name |
| 81 | extern string strPoolDashboardUrl; // operator: optional dashboard URL | 84 | extern string strPoolDashboardUrl; // operator: optional dashboard URL |