blocks: rename moreTs -> moreTimestamp for clarity

This commit is contained in:
Braydon Fuller 2016-05-10 16:24:37 -04:00
parent 0ba78e7180
commit 310dd99086

View File

@ -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);