Skip to content

Commit

Permalink
Merge pull request #454 from LiskHQ/staging
Browse files Browse the repository at this point in the history
Reducing limit of GET /peer/blocks from 1440 to 34
  • Loading branch information
karmacoma committed Mar 3, 2017
2 parents 47da6e1 + 0217a73 commit 77c492b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dist: 'trusty'
language: node_js
node_js:
- '6.9.4'
- '6.9.5'
cache:
directories:
- test/lisk-js
Expand Down
7 changes: 5 additions & 2 deletions modules/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ __private.attachApi = function () {
if (err) { return next(err); }
if (!report.isValid) { return res.json({success: false, error: report.issues}); }

// Get 1400+ blocks with all data (joins) from provided block id
// Get 34 blocks with all data (joins) from provided block id
// According to maxium payload of 58150 bytes per block with every transaction being a vote
// Discounting maxium compression setting used in middleware
// Maximum transport payload = 2000000 bytes
modules.blocks.loadBlocksData({
limit: 1440,
limit: 34, // 1977100 bytes
lastId: query.lastBlockId
}, function (err, data) {
res.status(200);
Expand Down

0 comments on commit 77c492b

Please sign in to comment.