Commit eab7974d authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1332 A full block can be generated with exactly 500 lines while the...

[fix] #1332 A full block can be generated with exactly 500 lines while the network accept at most 499
parent 234946b9
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment