Only show relevant hashrate in the pool page

This commit is contained in:
nymkappa
2022-03-08 13:54:04 +01:00
parent ad2dcc46e4
commit 2b5d972e8d
8 changed files with 53 additions and 80 deletions

View File

@@ -58,14 +58,14 @@ class Mining {
/**
* Get all mining pool stats for a pool
*/
public async $getPoolStat(interval: string | null, poolId: number): Promise<object> {
public async $getPoolStat(poolId: number): Promise<object> {
const pool = await PoolsRepository.$getPool(poolId);
if (!pool) {
throw new Error(`This mining pool does not exist`);
}
const blockCount: number = await BlocksRepository.$blockCount(poolId, interval);
const emptyBlocks: EmptyBlocks[] = await BlocksRepository.$getEmptyBlocks(poolId, interval);
const blockCount: number = await BlocksRepository.$blockCount(poolId);
const emptyBlocks: EmptyBlocks[] = await BlocksRepository.$getEmptyBlocks(poolId);
return {
pool: pool,