From 201eff593b123081c1535ab43c2cc6c4eca74775 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 22 Feb 2022 20:37:17 +0900 Subject: [PATCH] Remove block subsidy from mempool blocks --- .../blockchain-blocks.component.html | 2 +- .../mempool-blocks/mempool-blocks.component.html | 2 +- .../mempool-blocks/mempool-blocks.component.ts | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html index 0f04f3a03..8ddbd579b 100644 --- a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html +++ b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html @@ -14,7 +14,7 @@ {{ block?.extras?.feeRange[1] | number:feeRounding }} - {{ block?.extras?.feeRange[block?.extras?.feeRange.length - 1] | number:feeRounding }} sat/vB
- +
diff --git a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html index 2eff96bca..112b35df2 100644 --- a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html +++ b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html @@ -13,7 +13,7 @@ {{ projectedBlock.feeRange[0] | number:feeRounding }} - {{ projectedBlock.feeRange[projectedBlock.feeRange.length - 1] | number:feeRounding }} sat/vB
- +
diff --git a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts index 6fe2a155c..05735c0be 100644 --- a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts +++ b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts @@ -34,7 +34,6 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy { network = ''; now = new Date().getTime(); showMiningInfo = false; - blockSubsidy = 50; blockWidth = 125; blockPadding = 30; @@ -111,7 +110,6 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy { if (this.stateService.network === '') { block.blink = specialBlocks[block.height] ? true : false; } - this.setBlockSubsidy(block.height); }); const stringifiedBlocks = JSON.stringify(mempoolBlocks); @@ -212,18 +210,6 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy { return block.index; } - setBlockSubsidy(blockHeight) { - if (!['', 'testnet', 'signet'].includes(this.stateService.network)) { - return; - } - this.blockSubsidy = 50; - let halvenings = Math.floor(blockHeight / 210000); - while (halvenings > 0) { - this.blockSubsidy = this.blockSubsidy / 2; - halvenings--; - } - } - reduceMempoolBlocksToFitScreen(blocks: MempoolBlock[]): MempoolBlock[] { const innerWidth = this.stateService.env.BASE_MODULE !== 'liquid' && window.innerWidth <= 767.98 ? window.innerWidth : window.innerWidth / 2; const blocksAmount = Math.min(this.stateService.env.MEMPOOL_BLOCKS_AMOUNT, Math.floor(innerWidth / (this.blockWidth + this.blockPadding)));