Skip to content

Commit

Permalink
Merge pull request #342 from matiu/feat/tx-order2
Browse files Browse the repository at this point in the history
better ordering of txs
  • Loading branch information
cmgustavo committed Jul 17, 2015
2 parents 1735552 + b9ad26a commit 74a96e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion app/controllers/addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 6 additions & 5 deletions lib/TransactionDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 74a96e9

Please sign in to comment.