From 310dd99086de87d4a5873bc1f66bd9cd7a47cbce Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 10 May 2016 16:24:37 -0400 Subject: [PATCH] blocks: rename moreTs -> moreTimestamp for clarity --- lib/blocks.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/blocks.js b/lib/blocks.js index f99721f..27403ae 100644 --- a/lib/blocks.js +++ b/lib/blocks.js @@ -147,12 +147,12 @@ BlockController.prototype.blockIndex = function(req, res, next, height) { }); }; -BlockController.prototype._getBlockSummary = function(hash, moreTs, next) { +BlockController.prototype._getBlockSummary = function(hash, moreTimestamp, next) { var self = this; function finish(result) { - if (moreTs > result.time) { - moreTs = result.time; + if (moreTimestamp > result.time) { + moreTimestamp = result.time; } return next(null, result); } @@ -236,7 +236,7 @@ BlockController.prototype.list = function(req, res) { var next = lte ? this.formatTimestamp(new Date(lte * 1000)) : null; var limit = parseInt(req.query.limit || BLOCK_LIMIT); var more = false; - var moreTs = lte; + var moreTimestamp = lte; self.node.services.bitcoind.getBlockHashesByTimestamp(lte, gte, function(err, hashes) { if(err) { @@ -253,7 +253,7 @@ BlockController.prototype.list = function(req, res) { async.mapSeries( hashes, function(hash, next) { - self._getBlockSummary(hash, moreTs, next); + self._getBlockSummary(hash, moreTimestamp, next); }, function(err, blocks) { if(err) { @@ -278,7 +278,7 @@ BlockController.prototype.list = function(req, res) { }; if(more) { - data.pagination.moreTs = moreTs; + data.pagination.moreTs = moreTimestamp; } res.jsonp(data);