wallet: minor.
This commit is contained in:
parent
3599ab5d9a
commit
874d725f40
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user