Use MEMPOOL_BLOCKS_AMOUNT config in the frontend

fixes #852
This commit is contained in:
softsimon committed 2021-10-05 04:37:24 +04:00
1 parent 6e93ef68fe
commit 822c840e54
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -75,7 +75,8 @@ class MempoolBlocks {
let blockSize = 0;
let transactions: TransactionExtended[] = [];
transactionsSorted.forEach((tx) => {
if (blockWeight + tx.weight <= config.MEMPOOL.BLOCK_WEIGHT_UNITS || mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT) {
if (blockWeight + tx.weight <= config.MEMPOOL.BLOCK_WEIGHT_UNITS
|| mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT - 1) {
blockWeight += tx.weight;
blockSize += tx.size;
transactions.push(tx);