From 569c18241fb9d9725da9d93d5563912b75923d9b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 17 Jan 2017 17:10:00 -0800 Subject: [PATCH] txdb: fix range queries. --- lib/wallet/txdb.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/wallet/txdb.js b/lib/wallet/txdb.js index 400531c6..c08b5b3c 100644 --- a/lib/wallet/txdb.js +++ b/lib/wallet/txdb.js @@ -584,7 +584,9 @@ TXDB.prototype.getBlocks = function getBlocks() { return this.keys({ gte: layout.b(0), lte: layout.b(0xffffffff), - parse: layout.bb + parse: function(key) { + return layout.bb(key); + } }); }; @@ -1691,7 +1693,9 @@ TXDB.prototype.getHistoryHashes = function getHistoryHashes(account) { return this.keys({ gte: layout.t(encoding.NULL_HASH), lte: layout.t(encoding.HIGH_HASH), - parse: layout.tt + parse: function(key) { + return layout.tt(key); + } }); }; @@ -1725,7 +1729,9 @@ TXDB.prototype.getPendingHashes = function getPendingHashes(account) { return this.keys({ gte: layout.p(encoding.NULL_HASH), lte: layout.p(encoding.HIGH_HASH), - parse: layout.pp + parse: function(key) { + return layout.pp(key); + } }); };