mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
Keep API process out of SV2 sockets
This commit is contained in:
@@ -144,7 +144,7 @@ export class AppController {
|
||||
|
||||
@Get('network')
|
||||
public async network() {
|
||||
return this.bitcoinRpcService.miningInfo;
|
||||
return this.bitcoinRpcService.miningInfo ?? {};
|
||||
}
|
||||
|
||||
@Get('info/chart')
|
||||
|
||||
@@ -46,6 +46,11 @@ export class StratumV2Service implements OnModuleInit {
|
||||
) {}
|
||||
|
||||
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') {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user