Keep API process out of SV2 sockets

This commit is contained in:
Ben
2026-06-07 23:09:44 -04:00
parent 93dde1a899
commit 96e0e36755
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ export class AppController {
@Get('network') @Get('network')
public async network() { public async network() {
return this.bitcoinRpcService.miningInfo; return this.bitcoinRpcService.miningInfo ?? {};
} }
@Get('info/chart') @Get('info/chart')
+5
View File
@@ -46,6 +46,11 @@ export class StratumV2Service implements OnModuleInit {
) {} ) {}
public async onModuleInit(): Promise<void> { public async onModuleInit(): Promise<void> {
if (process.env.API_ONLY === 'true') {
console.log('API-only process skipping Stratum V2 socket listeners');
return;
}
if (process.env.MASTER === 'true') { if (process.env.MASTER === 'true') {
return; return;
} }