pool: allow sending filterload to peers without an id to add to the bloom filter.
This commit is contained in:
parent
a5f20114e8
commit
24d9b2b2d8
@ -348,17 +348,19 @@ Pool.prototype.watch = function watch(id) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hid = utils.toHex(id);
|
||||
if (this.watchMap[hid])
|
||||
this.watchMap[hid]++;
|
||||
else
|
||||
this.watchMap[hid] = 1;
|
||||
if (id) {
|
||||
var hid = utils.toHex(id);
|
||||
if (this.watchMap[hid])
|
||||
this.watchMap[hid]++;
|
||||
else
|
||||
this.watchMap[hid] = 1;
|
||||
|
||||
if (this.bloom.test(id, 'hex'))
|
||||
return;
|
||||
if (this.bloom.test(id, 'hex'))
|
||||
return;
|
||||
|
||||
if (id)
|
||||
this.bloom.add(id, 'hex');
|
||||
}
|
||||
|
||||
if (this.peers.load)
|
||||
this.peers.load.updateWatch();
|
||||
for (var i = 0; i < this.peers.block.length; i++)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user