From 07adef4e8c5d500cc118a085398fafedae3146e7 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Wed, 23 Jan 2019 21:22:09 +0100
Subject: [PATCH] [fix] #1332 A full block can be generated with exactly 500
 lines while the network accept at most 499 (cherry-picked from 1.7 branch)

---
 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 55e9161f7..ce2ebed47 100644
--- a/app/modules/prover/lib/blockGenerator.ts
+++ b/app/modules/prover/lib/blockGenerator.ts
@@ -653,7 +653,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