From 7a8f7e7fa767d19f44f0a6a6db84de68f812bebe Mon Sep 17 00:00:00 2001 From: bitflash-maintainer Date: Sat, 8 Aug 2026 05:28:04 +0000 Subject: 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) --- src/main.cpp | 1 + src/main.h | 1 + src/main_gui.cpp | 3 +++ src/nostr.cpp | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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; string strSetDataDir; int nDropMessagesTest = 0; bool fSoloMineTest = false; // /solomine: mine without requiring a peer (local test) +bool fPoolNoAnnounce = false; // /noannounce: operator serves miners but never publishes pool announcements // Settings int fGenerateBitcoins; diff --git a/src/main.h b/src/main.h index 307cee5..22be3dc 100644 --- a/src/main.h +++ b/src/main.h @@ -86,6 +86,7 @@ extern bool fMineModeFromCommandLine; extern string strParticipantPool; // participant: pool .btf address extern string strPayoutAddress; // participant: /payoutaddr override (mine without a wallet) extern string strPayoutFile; // participant: /payoutfile address list, rotated per reconnect +extern bool fPoolNoAnnounce; // /noannounce: suppress pool announcements extern int nHashThreads; // participant: /hashthreads override (0 = cores-1) extern string strPoolName; // operator: announced pool name 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[]) if (!poolDash.empty()) strPoolDashboardUrl = poolDash; + if (arg(argc,argv,"/noannounce") || arg(argc,argv,"-noannounce")) + fPoolNoAnnounce = true; + string poolFee = argval2(argc, argv, "/poolfee", "-poolfee"); if (!poolFee.empty()) 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*) LogPrint("pool", "ThreadBtfPoolAnnouncer started\n"); while (!fShutdown) { - if (nMineMode == MINE_OPERATOR && gPoolRunning) + if (nMineMode == MINE_OPERATOR && gPoolRunning && !fPoolNoAnnounce) { BtfPoolAnnouncement ann; ann.btfAddress = BtfLocalAddress(); @@ -1763,7 +1763,7 @@ void ThreadNostrSeed(void* parg) } CATCH_PRINT_EXCEPTION("ConnectDiscoveredBtfPeers") - if (nMineMode == MINE_OPERATOR && gPoolRunning) + if (nMineMode == MINE_OPERATOR && gPoolRunning && !fPoolNoAnnounce) { BtfPoolAnnouncement ann; ann.btfAddress = BtfLocalAddress(); -- cgit v1.2.3