From eab7974dd9425ed196ed6885c7d73ee727e7f5eb Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Wed, 23 Jan 2019 21:18:40 +0100 Subject: [PATCH] [fix] #1332 A full block can be generated with exactly 500 lines while the network accept at most 499 --- app/modules/prover/lib/blockGenerator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/prover/lib/blockGenerator.ts b/app/modules/prover/lib/blockGenerator.ts index 061fc384f..6cd68b0cb 100644 --- a/app/modules/prover/lib/blockGenerator.ts +++ b/app/modules/prover/lib/blockGenerator.ts @@ -644,7 +644,7 @@ export class BlockGenerator { transactions.forEach((tx:any) => { const txDTO = TransactionDTO.fromJSONObject(tx) const txLen = txDTO.getLen() - if (txLen <= CommonConstants.MAXIMUM_LEN_OF_COMPACT_TX && blockLen + txLen <= maxLenOfBlock && tx.version == CommonConstants.TRANSACTION_VERSION) { + if (txLen <= CommonConstants.MAXIMUM_LEN_OF_COMPACT_TX && blockLen + txLen < maxLenOfBlock && tx.version == CommonConstants.TRANSACTION_VERSION) { block.transactions.push(txDTO); } blockLen += txLen; -- GitLab