Crash fix.

This commit is contained in:
softsimon
2020-05-26 11:02:12 +07:00
parent 820642cf1c
commit 99ba1a9db7
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ class Blocks {
block.reward = transactions[0].vout.reduce((acc, curr) => acc + curr.value, 0);
transactions.sort((a, b) => b.feePerVsize - a.feePerVsize);
block.medianFee = transactions.length > 1 ? Common.median(transactions.map((tx) => tx.feePerVsize)) : 0;
block.feeRange = transactions.length > 1 ? Common.getFeesInRange(transactions, 8) : [0, 0];
block.feeRange = transactions.length > 1 ? Common.getFeesInRange(transactions, 8, 1) : [0, 0];
block.coinbaseTx = this.stripCoinbaseTransaction(transactions[0]);
this.blocks.push(block);