mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 09:39:17 +01:00
Show getnetworkhashps core result in dashboard + update unit formatting
This commit is contained in:
parent
b6fcf40565
commit
1f4cf1710a
3 changed files with 3 additions and 3 deletions
|
@ -630,6 +630,7 @@ class Routes {
|
|||
res.json({
|
||||
hashrates: hashrates,
|
||||
difficulty: difficulty,
|
||||
currentHashrate: await bitcoinClient.getNetworkHashPs()
|
||||
});
|
||||
} catch (e) {
|
||||
res.status(500).send(e instanceof Error ? e.message : e);
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
<div class="item">
|
||||
<h5 class="card-title" i18n="mining.hashrate">Hashrate</h5>
|
||||
<p class="card-text">
|
||||
{{ hashrates.currentHashrate | amountShortener }}
|
||||
<span class="symbol">hashes/sec</span>
|
||||
{{ hashrates.currentHashrate | amountShortener: 1 : 'H/s' }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
|
|
@ -125,7 +125,7 @@ export class HashrateChartComponent implements OnInit {
|
|||
return {
|
||||
blockCount: parseInt(response.headers.get('x-total-count'), 10),
|
||||
currentDifficulty: Math.round(data.difficulty[data.difficulty.length - 1].difficulty * 100) / 100,
|
||||
currentHashrate: data.hashrates[data.hashrates.length - 1].avgHashrate,
|
||||
currentHashrate: data.currentHashrate
|
||||
};
|
||||
}),
|
||||
retryWhen((errors) => errors.pipe(
|
||||
|
|
Loading…
Add table
Reference in a new issue