blocks: fix for getBlockHashesByTimestamp
This commit is contained in:
parent
e4f585ad15
commit
13efeec84b
@ -39,10 +39,10 @@ BlockController.prototype.block = function(req, res, next, hash) {
|
|||||||
|
|
||||||
self.node.services.bitcoind.getBlockHeader(hash, function(err, info) {
|
self.node.services.bitcoind.getBlockHeader(hash, function(err, info) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return common.handleErrors(err, res);
|
return common.handleErrors(err, res);
|
||||||
}
|
}
|
||||||
req.block = self.transformBlock(block, info);
|
req.block = self.transformBlock(block, info);
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -125,7 +125,7 @@ BlockController.prototype.list = function(req, res) {
|
|||||||
var more = false;
|
var more = false;
|
||||||
var moreTs = lte;
|
var moreTs = lte;
|
||||||
|
|
||||||
self.node.services.db.getBlockHashesByTimestamp(lte, gte, function(err, hashes) {
|
self.node.services.bitcoind.getBlockHashesByTimestamp(lte, gte, function(err, hashes) {
|
||||||
if(err) {
|
if(err) {
|
||||||
return common.handleErrors(err, res);
|
return common.handleErrors(err, res);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user