parent
0753b11840
commit
c08a4c8424
@ -75,6 +75,7 @@ class Blocks {
|
|||||||
transactions.sort((a, b) => b.feePerVsize - a.feePerVsize);
|
transactions.sort((a, b) => b.feePerVsize - a.feePerVsize);
|
||||||
block.medianFee = transactions.length > 1 ? this.median(transactions.map((tx) => tx.feePerVsize)) : 0;
|
block.medianFee = transactions.length > 1 ? this.median(transactions.map((tx) => tx.feePerVsize)) : 0;
|
||||||
block.feeRange = transactions.length > 1 ? this.getFeesInRange(transactions, 8) : [0, 0];
|
block.feeRange = transactions.length > 1 ? this.getFeesInRange(transactions, 8) : [0, 0];
|
||||||
|
block.coinbaseTx = transactions[0];
|
||||||
|
|
||||||
this.blocks.push(block);
|
this.blocks.push(block);
|
||||||
if (this.blocks.length > config.KEEP_BLOCK_AMOUNT) {
|
if (this.blocks.length > config.KEEP_BLOCK_AMOUNT) {
|
||||||
|
@ -105,6 +105,7 @@ export interface Block {
|
|||||||
medianFee?: number;
|
medianFee?: number;
|
||||||
feeRange?: number[];
|
feeRange?: number[];
|
||||||
reward?: number;
|
reward?: number;
|
||||||
|
coinbaseTx?: Transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Address {
|
export interface Address {
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Miner</td>
|
<td>Miner</td>
|
||||||
<td><app-miner [coinbaseTransaction]="transactions && transactions[0]"></app-miner></td>
|
<td><app-miner [coinbaseTransaction]="block.coinbaseTx || (transactions && transactions[0])"></app-miner></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -92,6 +92,7 @@ export interface Block {
|
|||||||
medianFee?: number;
|
medianFee?: number;
|
||||||
feeRange?: number[];
|
feeRange?: number[];
|
||||||
reward?: number;
|
reward?: number;
|
||||||
|
coinbaseTx?: Transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Address {
|
export interface Address {
|
||||||
|
@ -19,6 +19,7 @@ export class MinerComponent implements OnChanges {
|
|||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnChanges() {
|
ngOnChanges() {
|
||||||
|
this.miner = '';
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.findMinerFromCoinbase();
|
this.findMinerFromCoinbase();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user