Merge hashrate and difficulty into one chart

This commit is contained in:
nymkappa
2022-02-22 15:50:14 +09:00
parent 98e0e1e9c1
commit 83a382a0cb
6 changed files with 148 additions and 74 deletions

View File

@@ -187,12 +187,11 @@ class BlocksRepository {
* Get the oldest indexed block
*/
public async $oldestBlockTimestamp(): Promise<number> {
const query = `SELECT blockTimestamp
const query = `SELECT UNIX_TIMESTAMP(blockTimestamp) as blockTimestamp
FROM blocks
ORDER BY height
LIMIT 1;`;
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows]: any[] = await connection.query(query);