Merge pull request #5595 from mempool/nymkappa/hashrate-1w

[mining] use getNetworkHashPs(1008)
This commit is contained in:
wiz 2024-10-17 15:08:47 +09:00 committed by GitHub
commit 8a579cc374
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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>