diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index ec1f3f7ac..80e2679fe 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -1320,10 +1320,12 @@ Pool.prototype.watchWallet = function watchWallet(wallet) { }, this); wallet.on('add address', wallet._poolOnAdd = function(address) { + utils.debug('Adding address to watch: %s', address.getAddress()); self.watchAddress(address); }); wallet.on('remove address', wallet._poolOnRemove = function(address) { + utils.debug('Removing address to watch: %s', address.getAddress()); self.unwatchAddress(address); }); }; diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index b3b38632f..d5eba8004 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -68,7 +68,7 @@ function Wallet(options) { this.n = options.n || 1; if(options.pool) { - options.addWallet(this); + options.watchWallet(this); } if (this.n > 1)