rebase
This commit is contained in:
parent
2b2c945339
commit
4e7f1f39d9
|
@ -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',
|
||||
|
|
|
@ -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…
Reference in New Issue