Make Block Weight Unit configurable in frontend+backend.

This commit is contained in:
softsimon committed 2021-07-31 17:30:35 +03:00
1 parent a32c1f40b1
commit 037f472f8c
12 files changed
+22 -13

No files matched your search

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