Merge pull request #342 from matiu/feat/tx-order2
better ordering of txs
This commit is contained in:
commit
74a96e98b3
@ -211,7 +211,6 @@ exports.multitxs = function(req, res, next) {
|
|||||||
}, {
|
}, {
|
||||||
ignoreCache: req.param('noCache'),
|
ignoreCache: req.param('noCache'),
|
||||||
includeTxInfo: true,
|
includeTxInfo: true,
|
||||||
dontFillSpent: true,
|
|
||||||
});
|
});
|
||||||
}, function(err) { // finished callback
|
}, function(err) { // finished callback
|
||||||
if (err) return common.handleErrors(err, res);
|
if (err) return common.handleErrors(err, res);
|
||||||
|
|||||||
@ -448,8 +448,6 @@ TransactionDb.prototype._parseAddrData = function(k, data, ignoreCache) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// opts.dontFillSpent
|
|
||||||
|
|
||||||
TransactionDb.prototype.fromAddr = function(addr, opts, cb) {
|
TransactionDb.prototype.fromAddr = function(addr, opts, cb) {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
var self = this;
|
var self = this;
|
||||||
@ -475,9 +473,12 @@ TransactionDb.prototype.fromAddr = function(addr, opts, cb) {
|
|||||||
})
|
})
|
||||||
.on('error', cb)
|
.on('error', cb)
|
||||||
.on('end', function() {
|
.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) {
|
async.eachLimit(ret.filter(function(x) {
|
||||||
return !x.spentIsConfirmed;
|
return !x.spentIsConfirmed;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user