walletdb: minor.
This commit is contained in:
parent
5e52c7f373
commit
448771a6fe
@ -51,6 +51,7 @@ function WalletDB(options) {
|
||||
this.fees = options.fees;
|
||||
this.logger = options.logger || bcoin.defaultLogger;
|
||||
this.batches = {};
|
||||
this.watchers = {};
|
||||
this.workerPool = null;
|
||||
|
||||
// We need one read lock for `get` and `create`.
|
||||
@ -76,8 +77,6 @@ function WalletDB(options) {
|
||||
if (bcoin.useWorkers)
|
||||
this.workerPool = new bcoin.workers();
|
||||
|
||||
this.watchers = {};
|
||||
|
||||
this._init();
|
||||
}
|
||||
|
||||
@ -95,6 +94,12 @@ WalletDB.prototype._init = function _init() {
|
||||
self.emit('error', err);
|
||||
});
|
||||
|
||||
if (bcoin.useWorkers) {
|
||||
this.workerPool.on('error', function(err) {
|
||||
self.emit('error', err);
|
||||
});
|
||||
}
|
||||
|
||||
function handleEvent(event, tx, map) {
|
||||
var i, path;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user