add all addresses to bloom filter.
This commit is contained in:
parent
6176b0d228
commit
47f75c9957
@ -123,6 +123,10 @@ SPVNode.prototype._init = function _init() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.walletdb.on('save address', function(hash) {
|
||||||
|
self.pool.watch(hash, 'hex');
|
||||||
|
});
|
||||||
|
|
||||||
function load(err) {
|
function load(err) {
|
||||||
if (err)
|
if (err)
|
||||||
return self.emit('error', err);
|
return self.emit('error', err);
|
||||||
|
|||||||
@ -835,12 +835,12 @@ Wallet.prototype.syncOutputDepth = function syncOutputDepth(tx, callback) {
|
|||||||
if (!account)
|
if (!account)
|
||||||
return next();
|
return next();
|
||||||
|
|
||||||
account.setDepth(receiveDepth, changeDepth, function(err, rec, chng) {
|
account.setDepth(receiveDepth, changeDepth, function(err, rcv, chng) {
|
||||||
if (err)
|
if (err)
|
||||||
return next(err);
|
return next(err);
|
||||||
|
|
||||||
if (rec)
|
if (rcv)
|
||||||
receive.push(rec);
|
receive.push(rcv);
|
||||||
|
|
||||||
if (chng)
|
if (chng)
|
||||||
change.push(chng);
|
change.push(chng);
|
||||||
|
|||||||
@ -682,6 +682,8 @@ WalletDB.prototype.saveAddress = function saveAddress(id, addresses, callback) {
|
|||||||
if (self.tx.filter)
|
if (self.tx.filter)
|
||||||
self.tx.filter.add(hash[0], 'hex');
|
self.tx.filter.add(hash[0], 'hex');
|
||||||
|
|
||||||
|
self.emit('save address', hash[0], hash[1]);
|
||||||
|
|
||||||
self.db.fetch('W/' + hash[0], parsePaths, function(err, paths) {
|
self.db.fetch('W/' + hash[0], parsePaths, function(err, paths) {
|
||||||
if (err)
|
if (err)
|
||||||
return next(err);
|
return next(err);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user