From b9ad26ab7e7071476a37f29b22347bf2d68b9276 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 17 Jul 2015 18:35:44 -0300 Subject: [PATCH] rm broken dontFillSpend option --- app/controllers/addresses.js | 1 - lib/TransactionDb.js | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/addresses.js b/app/controllers/addresses.js index aee2fe9..425602b 100644 --- a/app/controllers/addresses.js +++ b/app/controllers/addresses.js @@ -211,7 +211,6 @@ exports.multitxs = function(req, res, next) { }, { ignoreCache: req.param('noCache'), includeTxInfo: true, - dontFillSpent: true, }); }, function(err) { // finished callback if (err) return common.handleErrors(err, res); diff --git a/lib/TransactionDb.js b/lib/TransactionDb.js index aa791b8..c80c132 100644 --- a/lib/TransactionDb.js +++ b/lib/TransactionDb.js @@ -448,8 +448,6 @@ TransactionDb.prototype._parseAddrData = function(k, data, ignoreCache) { }; -// opts.dontFillSpent - TransactionDb.prototype.fromAddr = function(addr, opts, cb) { opts = opts || {}; var self = this; @@ -475,9 +473,12 @@ TransactionDb.prototype.fromAddr = function(addr, opts, cb) { }) .on('error', cb) .on('end', function() { - if (opts.dontFillSpent) { - return cb(null, ret) - } + + // This is a bad idea. ADDR_PREFIX ONLY indexes tx in outputs + // it is still necesarry for search for inputs + // if (opts.dontFillSpent) { + // return cb(null, ret) + //} async.eachLimit(ret.filter(function(x) { return !x.spentIsConfirmed;