Footer and header design updates.

This commit is contained in:
Simon Lindh
2020-02-24 03:42:29 +07:00
committed by wiz
parent 864b33fb38
commit c550c888a4
23 changed files with 114 additions and 82 deletions

View File

@@ -60,6 +60,8 @@ class Blocks {
}
}
console.log(`${found} of ${txIds.length} found in mempool. ${notFound} not found.`);
transactions.sort((a, b) => b.feePerVsize - a.feePerVsize);
block.medianFee = this.median(transactions.map((tx) => tx.feePerVsize));
block.feeRange = this.getFeesInRange(transactions, 8);

View File

@@ -104,7 +104,7 @@ class Mempool {
}
// Replace mempool to clear already confirmed transactions
const newMempool: any = {};
const newMempool = {};
transactions.forEach((tx) => {
if (this.mempoolCache[tx]) {
newMempool[tx] = this.mempoolCache[tx];
@@ -113,6 +113,9 @@ class Mempool {
}
});
console.log(`New mempool size: ${Object.keys(newMempool).length} ` +
` Change: ${transactions.length - Object.keys(newMempool).length}`);
this.mempoolCache = newMempool;
if (hasChange && this.mempoolChangedCallback) {