[mining] use getNetworkHashPs(1008)

This commit is contained in:
nymkappa 2024-10-14 17:03:52 +09:00
parent 8dac5cff9a
commit 1c4be164dd
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE
2 changed files with 2 additions and 2 deletions

View File

@ -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');

View File

@ -5,7 +5,7 @@
<div *ngIf="widget">
<div class="pool-distribution" *ngIf="(hashrateObservable$ | async) as hashrates; else loadingStats">
<div class="item">
<h5 class="card-title" i18n="mining.hashrate">Hashrate</h5>
<h5 class="card-title" i18n="mining.hashrate">Hashrate (1w)</h5>
<p class="card-text">
{{ hashrates.currentHashrate | amountShortener: 1 : 'H/s' }}
</p>