fix sort 2

This commit is contained in:
Matias Alejo Garcia 2015-10-28 22:10:00 -03:00
parent 4662c2ecdc
commit 36c2f5e1c5

View File

@ -144,8 +144,8 @@ exports.multitxs = function(req, res, next) {
var MAX = 9999999999;
txs.sort(function(a, b) {
var b = (b.bs || b.firstSeenTs || MAX) + b.txid;
var a = (a.bs || b.firstSeenTs || MAX) + a.txid;
var b = (b.ts || b.firstSeenTs || MAX) + b.txid;
var a = (a.ts || b.firstSeenTs || MAX) + a.txid;
if (a > b) return -1;
if (a < b) return 1;
return 0;