diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-08-08 05:28:04 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-08-23 04:37:36 +0000 |
| commit | 7a8f7e7fa767d19f44f0a6a6db84de68f812bebe (patch) | |
| tree | c1a3a661feac89ccc59b60b885f20dbdae1dab04 /src | |
| parent | bef4f5b3a5a6f5a663b7ea7753dd57e368fd8929 (diff) | |
operator: /noannounce flag -- serve miners without publishing pool announcements
Descriptor (38501) still published so miners can resolve the pool;
only the public pool listing event (38503) is suppressed.
(cherry picked from commit 17bbdae1ec97945c37c1d5b2486e5c01a4d7ad87)
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 1 | ||||
| -rw-r--r-- | src/main.h | 1 | ||||
| -rw-r--r-- | src/main_gui.cpp | 3 | ||||
| -rw-r--r-- | src/nostr.cpp | 4 |
4 files changed, 7 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 32ab952..69d9d30 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -87,6 +87,7 @@ CKey keyUser; | |||
| 87 | string strSetDataDir; | 87 | string strSetDataDir; |
| 88 | int nDropMessagesTest = 0; | 88 | int nDropMessagesTest = 0; |
| 89 | bool fSoloMineTest = false; // /solomine: mine without requiring a peer (local test) | 89 | bool fSoloMineTest = false; // /solomine: mine without requiring a peer (local test) |
| 90 | bool fPoolNoAnnounce = false; // /noannounce: operator serves miners but never publishes pool announcements | ||
| 90 | 91 | ||
| 91 | // Settings | 92 | // Settings |
| 92 | int fGenerateBitcoins; | 93 | int fGenerateBitcoins; |
| @@ -86,6 +86,7 @@ extern bool fMineModeFromCommandLine; | |||
| 86 | extern string strParticipantPool; // participant: pool .btf address | 86 | extern string strParticipantPool; // participant: pool .btf address |
| 87 | extern string strPayoutAddress; // participant: /payoutaddr override (mine without a wallet) | 87 | extern string strPayoutAddress; // participant: /payoutaddr override (mine without a wallet) |
| 88 | extern string strPayoutFile; // participant: /payoutfile address list, rotated per reconnect | 88 | extern string strPayoutFile; // participant: /payoutfile address list, rotated per reconnect |
| 89 | extern bool fPoolNoAnnounce; // /noannounce: suppress pool announcements | ||
| 89 | extern int nHashThreads; // participant: /hashthreads override (0 = cores-1) | 90 | extern int nHashThreads; // participant: /hashthreads override (0 = cores-1) |
| 90 | extern string strPoolName; // operator: announced pool name | 91 | extern string strPoolName; // operator: announced pool name |
| 91 | extern string strPoolDashboardUrl; // operator: optional dashboard URL | 92 | extern string strPoolDashboardUrl; // operator: optional dashboard URL |
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index d0969b5..b1fe0af 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -250,6 +250,9 @@ static void ParseStartupArguments(int argc, char* argv[]) | |||
| 250 | if (!poolDash.empty()) | 250 | if (!poolDash.empty()) |
| 251 | strPoolDashboardUrl = poolDash; | 251 | strPoolDashboardUrl = poolDash; |
| 252 | 252 | ||
| 253 | if (arg(argc,argv,"/noannounce") || arg(argc,argv,"-noannounce")) | ||
| 254 | fPoolNoAnnounce = true; | ||
| 255 | |||
| 253 | string poolFee = argval2(argc, argv, "/poolfee", "-poolfee"); | 256 | string poolFee = argval2(argc, argv, "/poolfee", "-poolfee"); |
| 254 | if (!poolFee.empty()) | 257 | if (!poolFee.empty()) |
| 255 | dPoolFeePercent = atof(poolFee.c_str()); | 258 | dPoolFeePercent = atof(poolFee.c_str()); |
diff --git a/src/nostr.cpp b/src/nostr.cpp index 6d85bf6..47f001c 100644 --- a/src/nostr.cpp +++ b/src/nostr.cpp | |||
| @@ -1405,7 +1405,7 @@ void ThreadBtfPoolAnnouncer(void*) | |||
| 1405 | LogPrint("pool", "ThreadBtfPoolAnnouncer started\n"); | 1405 | LogPrint("pool", "ThreadBtfPoolAnnouncer started\n"); |
| 1406 | while (!fShutdown) | 1406 | while (!fShutdown) |
| 1407 | { | 1407 | { |
| 1408 | if (nMineMode == MINE_OPERATOR && gPoolRunning) | 1408 | if (nMineMode == MINE_OPERATOR && gPoolRunning && !fPoolNoAnnounce) |
| 1409 | { | 1409 | { |
| 1410 | BtfPoolAnnouncement ann; | 1410 | BtfPoolAnnouncement ann; |
| 1411 | ann.btfAddress = BtfLocalAddress(); | 1411 | ann.btfAddress = BtfLocalAddress(); |
| @@ -1763,7 +1763,7 @@ void ThreadNostrSeed(void* parg) | |||
| 1763 | } | 1763 | } |
| 1764 | CATCH_PRINT_EXCEPTION("ConnectDiscoveredBtfPeers") | 1764 | CATCH_PRINT_EXCEPTION("ConnectDiscoveredBtfPeers") |
| 1765 | 1765 | ||
| 1766 | if (nMineMode == MINE_OPERATOR && gPoolRunning) | 1766 | if (nMineMode == MINE_OPERATOR && gPoolRunning && !fPoolNoAnnounce) |
| 1767 | { | 1767 | { |
| 1768 | BtfPoolAnnouncement ann; | 1768 | BtfPoolAnnouncement ann; |
| 1769 | ann.btfAddress = BtfLocalAddress(); | 1769 | ann.btfAddress = BtfLocalAddress(); |