diff --git a/src/lib/trx.js b/src/lib/trx.js index 50c11456..15894ad1 100644 --- a/src/lib/trx.js +++ b/src/lib/trx.js @@ -513,9 +513,12 @@ export default class Trx { if (!utils.isInteger(start) || start < 0) return callback('Invalid start of range provided'); - if (!utils.isInteger(end) || end <= start) + if (!utils.isInteger(end) || end < start) return callback('Invalid end of range provided'); + if (end + 1 - start > 100) + return callback('Invalid range size, which should be no more than 100.'); + this.tronWeb.fullNode.request('wallet/getblockbylimitnext', { startNum: parseInt(start), endNum: parseInt(end) + 1