upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authorNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-07 11:34:17 -0300
committerBitflash <admin@bitflash.network>2026-08-07 15:06:21 -0300
commit8bf5b8cac5d91165b11d4ce65333b68edcc723b0 (patch)
treede92ea6afbc7762ec3e8f9654544ca56d9448c06 /src/main_gui.cpp
parent5c2e66b70ab3c15603a6e2d7a4ea9e02f3cd0604 (diff)
pool: add local Stratum bridge
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 41661b9..ce6d2b5 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -115,6 +115,8 @@ static void PrintUsage()
115 printf("Mining mode:\n"); 115 printf("Mining mode:\n");
116 printf(" /operator\n"); 116 printf(" /operator\n");
117 printf(" /participant=POOL_BTF_ADDRESS\n"); 117 printf(" /participant=POOL_BTF_ADDRESS\n");
118 printf(" /stratumbridge=POOL_BTF_ADDRESS\n");
119 printf(" /stratumbridgeport=N (default 3333; listen on 127.0.0.1)\n");
118 printf(" /solomine\n"); 120 printf(" /solomine\n");
119 printf(" /genproclimit=N (mining threads; 0 or absent = every core but one)\n"); 121 printf(" /genproclimit=N (mining threads; 0 or absent = every core but one)\n");
120 printf(" /checkblocks=N (blocks re-verified at startup, default 288, 0 = all)\n"); 122 printf(" /checkblocks=N (blocks re-verified at startup, default 288, 0 = all)\n");
@@ -226,6 +228,22 @@ static void ParseStartupArguments(int argc, char* argv[])
226 fMineModeFromCommandLine = true; 228 fMineModeFromCommandLine = true;
227 } 229 }
228 230
231 if (arg(argc,argv,"/stratumbridge") || arg(argc,argv,"-stratumbridge"))
232 {
233 fStratumBridge = true;
234 string bridgePool = argval2(argc, argv, "/stratumbridge", "-stratumbridge");
235 if (!bridgePool.empty())
236 strParticipantPool = bridgePool;
237 }
238
239 string bridgePort = argval2(argc, argv, "/stratumbridgeport", "-stratumbridgeport");
240 if (!bridgePort.empty())
241 {
242 int nPort = atoi(bridgePort.c_str());
243 if (nPort > 0 && nPort <= 65535)
244 nStratumBridgePort = nPort;
245 }
246
229 string poolName = argval2(argc, argv, "/poolname", "-poolname"); 247 string poolName = argval2(argc, argv, "/poolname", "-poolname");
230 if (!poolName.empty()) 248 if (!poolName.empty())
231 strPoolName = poolName; 249 strPoolName = poolName;
@@ -623,6 +641,10 @@ int main(int argc, char* argv[])
623 if (_beginthread(ThreadRPCServer, 0, NULL) == (uintptr_t)-1) 641 if (_beginthread(ThreadRPCServer, 0, NULL) == (uintptr_t)-1)
624 printf("Error: _beginthread(ThreadRPCServer) failed\n"); 642 printf("Error: _beginthread(ThreadRPCServer) failed\n");
625 } 643 }
644 if (fStratumBridge) {
645 if (_beginthread(ThreadStratumBridge, 0, NULL) == (uintptr_t)-1)
646 printf("Error: _beginthread(ThreadStratumBridge) failed\n");
647 }
626 if (fGenerateBitcoins) 648 if (fGenerateBitcoins)
627 StartMinerThreads(); 649 StartMinerThreads();
628 650