Instant mining pool identification from recent blocks.

refs #59
This commit is contained in:
softsimon committed 2020-05-10 00:54:07 +07:00
1 parent 688a73cf75
commit a42facb389
5 files changed
+5 -1

No files matched your search

+1
View File
@@ -75,6 +75,7 @@ class Blocks {
transactions.sort((a, b) => b.feePerVsize - a.feePerVsize);
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.coinbaseTx = transactions[0];
this.blocks.push(block);
if (this.blocks.length > config.KEEP_BLOCK_AMOUNT) {
+1
View File
@@ -105,6 +105,7 @@ export interface Block {
medianFee?: number;
feeRange?: number[];
reward?: number;
coinbaseTx?: Transaction;
}
export interface Address {