Empty block fix.

This commit is contained in:
Simon Lindh authored and wiz committed 2020-02-26 03:35:46 +09:00
1 parent 808aa27be7
commit 76fd441e07
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -63,8 +63,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);
block.medianFee = transactions.length ? this.median(transactions.map((tx) => tx.feePerVsize)) : 0;
block.feeRange = transactions.length ? this.getFeesInRange(transactions, 8) : [];
this.blocks.push(block);
if (this.blocks.length > config.KEEP_BLOCK_AMOUNT) {