Browse Source

rebase

activeAddress
Ivan Socolsky 9 years ago
parent
commit
4e7f1f39d9
No known key found for this signature in database GPG Key ID: FAECE6A05FAA4F56
  1. 1
      lib/storage.js
  2. 11
      test/integration/server.js

1
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',

11
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();

Loading…
Cancel
Save