fetch address

This commit is contained in:
Matias Alejo Garcia 2016-07-26 17:55:29 -03:00
parent 4946583afe
commit e8a687d59e
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
1 changed files with 25 additions and 0 deletions

View File

@ -609,6 +609,31 @@ Storage.prototype.storeActiveAddresses = function(walletId, addresses, cb) {
}, cb);
};
Storage.prototype.storeTxHistoryCache = function(walletId, firstPosition, items, cb) {
var self = this;
self.db.collection(collections.CACHE).findOne({
walletId: record.walletId,
type: 'historyCache'
}, function(err, result) {
if (err) return cb(err);
result = result || [];
result
self.db.collection(collections.CACHE).update({
walletId: record.walletId,
type: record.type,
key: record.key,
}, record, {
w: 1,
upsert: true,
}, next);
}, cb);
};
Storage.prototype.fetchActiveAddresses = function(walletId, cb) {
var self = this;