From dc5a6eb58a5056f88a762a0076b330091608dba8 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 20 Jan 2016 13:03:07 -0300 Subject: [PATCH] Revert "ignore invalid TXs" This reverts commit 3588e0225c708df13a70eb39d33885b336d97973. --- lib/server.js | 2 -- test/integration/server.js | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/server.js b/lib/server.js index 8ab92fe..9b731c1 100644 --- a/lib/server.js +++ b/lib/server.js @@ -2202,7 +2202,6 @@ WalletService.prototype.getTxHistory = function(opts, cb) { } else { action = 'invalid'; amount = 0; - log.warn("Got Invalid TX from address:", JSON.stringify(tx)); } function outputMap(o) { @@ -2283,7 +2282,6 @@ WalletService.prototype.getTxHistory = function(opts, cb) { var txs = res[1]; txs = decorate(txs, addresses, proposals); - txs = _.filter(txs, function(tx) { return tx.action != 'invalid' }) return cb(null, txs); }); diff --git a/test/integration/server.js b/test/integration/server.js index 885e294..b245558 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -4816,7 +4816,7 @@ describe('Wallet service', function() { done(); }); }); - it('should handle filter out invalid txs in history ', function(done) { + it('should handle invalid tx in history ', function(done) { var h = _.clone(TestData.history); h.push({ txid: 'xx' @@ -4827,7 +4827,8 @@ describe('Wallet service', function() { server.getTxHistory({}, function(err, txs) { should.not.exist(err); should.exist(txs); - txs.length.should.equal(l); + txs.length.should.equal(l + 1); + txs[l].action.should.equal('invalid'); done(); }); });