Updated pool summary page to display more info on hashrate and blocks

This commit is contained in:
nymkappa
2022-04-05 00:36:00 +09:00
parent ba92284e44
commit c4db7ec5f6
7 changed files with 387 additions and 149 deletions

View File

@@ -360,23 +360,6 @@ class BlocksRepository {
}
}
/**
* Return oldest blocks height
*/
public async $getOldestIndexedBlockHeight(): Promise<number> {
const connection = await DB.getConnection();
try {
const [rows]: any[] = await connection.query(`SELECT MIN(height) as minHeight FROM blocks`);
connection.release();
return rows[0].minHeight;
} catch (e) {
connection.release();
logger.err('$getOldestIndexedBlockHeight() error' + (e instanceof Error ? e.message : e));
throw e;
}
}
/**
* Get general block stats
*/