From 1c4be164dd30ae79779148a522d54d456a13d2a7 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 14 Oct 2024 17:03:52 +0900 Subject: [PATCH] [mining] use getNetworkHashPs(1008) --- backend/src/api/mining/mining-routes.ts | 2 +- .../app/components/hashrate-chart/hashrate-chart.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/api/mining/mining-routes.ts b/backend/src/api/mining/mining-routes.ts index 69e6d95d4..f53630ce2 100644 --- a/backend/src/api/mining/mining-routes.ts +++ b/backend/src/api/mining/mining-routes.ts @@ -183,7 +183,7 @@ class MiningRoutes { private async $getHistoricalHashrate(req: Request, res: Response) { let currentHashrate = 0, currentDifficulty = 0; try { - currentHashrate = await bitcoinClient.getNetworkHashPs(); + currentHashrate = await bitcoinClient.getNetworkHashPs(1008); currentDifficulty = await bitcoinClient.getDifficulty(); } catch (e) { logger.debug('Bitcoin Core is not available, using zeroed value for current hashrate and difficulty'); diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html index b50389ce8..b8a720743 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html @@ -5,7 +5,7 @@
-
Hashrate
+
Hashrate (1w)

{{ hashrates.currentHashrate | amountShortener: 1 : 'H/s' }}