From 4e7f1f39d928f39f01ba79fdc0759879f048d738 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 5 Aug 2016 23:43:58 -0300 Subject: [PATCH] rebase --- lib/storage.js | 1 - test/integration/server.js | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/storage.js b/lib/storage.js index de74832..6682679 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -741,7 +741,6 @@ Storage.prototype.storeTxHistoryCache = function(walletId, totalItems, firstPosi }, function(err) { if (err) return cb(err); - >>> >>> > store txs individually self.db.collection(collections.CACHE).update({ walletId: walletId, type: 'historyCacheStatus', diff --git a/test/integration/server.js b/test/integration/server.js index 6b42ce4..c415c82 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -6221,7 +6221,7 @@ describe('Wallet service', function() { }); }); - describe.only('#getTxHistory cache', function() { + describe('#getTxHistory cache', function() { var server, wallet, mainAddresses, changeAddresses; var _threshold = Defaults.HISTORY_CACHE_ADDRESS_THRESOLD; beforeEach(function(done) { @@ -6413,7 +6413,6 @@ describe('Wallet service', function() { skip: i, limit: 5, }, function(err, txs, fromCache) { - should.not.exist(err); should.exist(txs); txs.length.should.equal(5); @@ -6423,15 +6422,15 @@ describe('Wallet service', function() { next(); }); }, function() { - // Ask more that cached. - async.eachSeries(_.range(0, 210, 7), function(i, next) { + async.eachSeries(_.range(0, 200, 5), function(i, next) { server.getTxHistory({ skip: i, - limit: 7, + limit: 5, }, function(err, txs, fromCache) { should.not.exist(err); should.exist(txs); - var s = h.slice(i, i + 7); + txs.length.should.equal(5); + var s = h.slice(i, i + 5); _.pluck(txs, 'txid').should.deep.equal(_.pluck(s, 'txid')); fromCache.should.equal(i >= Defaults.CONFIRMATIONS_TO_START_CACHING && i < 200); next();