Add difficulty adjustment in mining page + Fix pools table on mobile

This commit is contained in:
nymkappa
2022-01-17 15:34:34 +09:00
parent 091027cc79
commit b9a047b22d
9 changed files with 63 additions and 20 deletions

View File

@@ -17,7 +17,8 @@ class Mining {
public async $getPoolsStats(interval: string = "100 YEAR") : Promise<object> {
let poolsStatistics = {};
const lastBlockHashrate = await this.bitcoinApi.$getEstimatedHashrate(717960);
const blockHeightTip = await this.bitcoinApi.$getBlockHeightTip();
const lastBlockHashrate = await this.bitcoinApi.$getEstimatedHashrate(blockHeightTip);
const poolsInfo: PoolInfo[] = await PoolsRepository.$getPoolsInfo(interval);
const blockCount: number = await BlocksRepository.$blockCount(interval);
const emptyBlocks: EmptyBlocks[] = await BlocksRepository.$countEmptyBlocks(interval);