Remove block subsidy from mempool blocks

This commit is contained in:
nymkappa
2022-02-22 20:37:17 +09:00
parent ced5862c3e
commit af9cbf578e
3 changed files with 2 additions and 16 deletions

View File

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