Skip to content

Commit cd2e755

Browse files
author
Chethan Krishna
committed
Use logical timestamps to display blocks
1 parent 639fdc9 commit cd2e755

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/services/bitcoind.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,9 +1691,13 @@ Bitcoin.prototype.getBlock = function(blockArg, callback) {
16911691
* @param {Number} low - The older timestamp in seconds
16921692
* @param {Function} callback
16931693
*/
1694-
Bitcoin.prototype.getBlockHashesByTimestamp = function(high, low, callback) {
1694+
Bitcoin.prototype.getBlockHashesByTimestamp = function(high, low, options, callback) {
16951695
var self = this;
1696-
self.client.getBlockHashes(high, low, function(err, response) {
1696+
if (_.isFunction(options)) {
1697+
callback = options;
1698+
options = {};
1699+
}
1700+
self.client.getBlockHashes(high, low, options, function(err, response) {
16971701
if (err) {
16981702
return callback(self._wrapRPCError(err));
16991703
}

0 commit comments

Comments
 (0)