Merge pull request #478 from isocolsky/fix/address-index
Fix index for address query
This commit is contained in:
commit
a01a32b9ed
|
@ -50,7 +50,8 @@ Storage.prototype._createIndexes = function() {
|
||||||
id: 1,
|
id: 1,
|
||||||
});
|
});
|
||||||
this.db.collection(collections.ADDRESSES).createIndex({
|
this.db.collection(collections.ADDRESSES).createIndex({
|
||||||
walletId: 1
|
walletId: 1,
|
||||||
|
createdOn: 1,
|
||||||
});
|
});
|
||||||
this.db.collection(collections.ADDRESSES).createIndex({
|
this.db.collection(collections.ADDRESSES).createIndex({
|
||||||
address: 1,
|
address: 1,
|
||||||
|
@ -63,6 +64,11 @@ Storage.prototype._createIndexes = function() {
|
||||||
type: 1,
|
type: 1,
|
||||||
key: 1,
|
key: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
this.db.collection(collections.ADDRESSES).dropIndex({
|
||||||
|
walletId: 1
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Storage.prototype.connect = function(opts, cb) {
|
Storage.prototype.connect = function(opts, cb) {
|
||||||
|
|
Loading…
Reference in New Issue