From 0f11642418ce3a42e0d075d4e8cec87523a765e3 Mon Sep 17 00:00:00 2001 From: softsimon Date: Fri, 24 Jul 2020 12:11:05 +0700 Subject: [PATCH] Fix for creating empty blocks. --- backend/src/api/blocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index a0a8e8494..0b158efe2 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -76,7 +76,7 @@ class Blocks { block.coinbaseTx = this.stripCoinbaseTransaction(transactions[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.slice(0, transactions.length - 2), 8) : [0, 0]; + block.feeRange = transactions.length > 1 ? Common.getFeesInRange(transactions.slice(0, transactions.length - 1), 8) : [0, 0]; this.blocks.push(block); if (this.blocks.length > config.KEEP_BLOCK_AMOUNT) {