wallet: minor.

This commit is contained in:
Christopher Jeffrey 2016-10-04 05:26:22 -07:00
parent 3599ab5d9a
commit 874d725f40
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -143,11 +143,11 @@ function WalletDB(options) {
this.network = Network.get(options.network);
this.fees = options.fees;
this.logger = options.logger || Logger.global;
this.wallets = {};
this.tip = this.network.genesis.hash;
this.height = 0;
this.depth = 0;
this.wallets = {};
// We need one read lock for `get` and `create`.
// It will hold locks specific to wallet ids.
@ -232,6 +232,7 @@ WalletDB.prototype._close = co(function* close() {
key = keys[i];
wallet = this.wallets[key];
yield wallet.destroy();
delete this.wallets[key];
}
yield this.db.close();