Browse Source

Merge pull request #595 from isocolsky/fix/index

Fix db indexes
activeAddress
Matias Alejo Garcia 8 years ago
committed by GitHub
parent
commit
968273f450
  1. 12
      lib/storage.js

12
lib/storage.js

@ -46,6 +46,10 @@ Storage.prototype._createIndexes = function() {
isPending: 1,
txid: 1,
});
this.db.collection(collections.TXS).createIndex({
walletId: 1,
createdOn: -1,
});
this.db.collection(collections.NOTIFICATIONS).createIndex({
walletId: 1,
id: 1,
@ -65,13 +69,7 @@ Storage.prototype._createIndexes = function() {
type: 1,
key: 1,
});
this.db.collection(collections.ADDRESSES).dropIndex({
walletId: 1
});
this.db.collection(collections.TX_NOTES).dropIndex({
this.db.collection(collections.TX_NOTES).createIndex({
walletId: 1,
txid: 1,
});

Loading…
Cancel
Save