Remove block subsidy from mempool blocks
This commit is contained in:
parent
98e0e1e9c1
commit
201eff593b
@ -14,7 +14,7 @@
|
||||
{{ block?.extras?.feeRange[1] | number:feeRounding }} - {{ block?.extras?.feeRange[block?.extras?.feeRange.length - 1] | number:feeRounding }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
||||
</div>
|
||||
<div *ngIf="showMiningInfo" class="block-size">
|
||||
<app-amount [satoshis]="block.extras.reward" digitsInfo="1.2-2" [noFiat]="true"></app-amount>
|
||||
<app-amount [satoshis]="block.extras.reward" digitsInfo="1.2-3" [noFiat]="true"></app-amount>
|
||||
</div>
|
||||
<div *ngIf="!showMiningInfo" class="block-size" [innerHTML]="'‎' + (block.size | bytes: 2)"></div>
|
||||
<div class="transaction-count">
|
||||
|
@ -13,7 +13,7 @@
|
||||
{{ projectedBlock.feeRange[0] | number:feeRounding }} - {{ projectedBlock.feeRange[projectedBlock.feeRange.length - 1] | number:feeRounding }} <span i18n="shared.sat-vbyte|sat/vB">sat/vB</span>
|
||||
</div>
|
||||
<div *ngIf="showMiningInfo" class="block-size">
|
||||
<app-amount [satoshis]="projectedBlock.totalFees + blockSubsidy * 100000000" digitsInfo="1.2-2" [noFiat]="true"></app-amount>
|
||||
<app-amount [satoshis]="projectedBlock.totalFees" digitsInfo="1.2-3" [noFiat]="true"></app-amount>
|
||||
</div>
|
||||
<div *ngIf="!showMiningInfo" class="block-size" [innerHTML]="'‎' + (projectedBlock.blockSize | bytes: 2)"></div>
|
||||
<div class="transaction-count">
|
||||
|
@ -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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user