Use actual MEMPOOL_BLOCKS_AMOUNT value for amount of mempool blocks.

This commit is contained in:
softsimon 2021-08-07 03:07:32 +03:00
parent 223288cc52
commit 5dc0f4e270
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

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