mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Actually use the past 8 blocks for reward stats
This commit is contained in:
parent
beae88778b
commit
8837b8c882
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ export class MiningDashboardComponent implements OnInit {
|
|||
ngOnInit(): void {
|
||||
this.$rewardStats = this.stateService.blocks$.pipe(
|
||||
map(([block]) => {
|
||||
this.blocks.push(block);
|
||||
this.blocks.unshift(block);
|
||||
this.blocks = this.blocks.slice(0, 8);
|
||||
const totalTx = this.blocks.reduce((acc, block) => acc + block.tx_count, 0);
|
||||
const totalFee = this.blocks.reduce((acc, block) => acc + block.extras?.totalFees ?? 0, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue