mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
Restore DB-backed connected miner hashrate
This commit is contained in:
@@ -58,6 +58,10 @@ export class ClientService {
|
||||
.execute();
|
||||
}
|
||||
|
||||
public async updateHashRate(id: string, hashRate: number, updatedAt = new Date()) {
|
||||
return await this.clientRepository.update({ id }, { hashRate, updatedAt });
|
||||
}
|
||||
|
||||
public async connectedClientCount(): Promise<number> {
|
||||
return await this.clientRepository.count();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user