txdb: fix range queries.

This commit is contained in:
Christopher Jeffrey 2017-01-17 17:10:00 -08:00
parent cdad00944c
commit 569c18241f
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

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