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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hid = utils.toHex(id);
|
if (id) {
|
||||||
if (this.watchMap[hid])
|
var hid = utils.toHex(id);
|
||||||
this.watchMap[hid]++;
|
if (this.watchMap[hid])
|
||||||
else
|
this.watchMap[hid]++;
|
||||||
this.watchMap[hid] = 1;
|
else
|
||||||
|
this.watchMap[hid] = 1;
|
||||||
|
|
||||||
if (this.bloom.test(id, 'hex'))
|
if (this.bloom.test(id, 'hex'))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (id)
|
|
||||||
this.bloom.add(id, 'hex');
|
this.bloom.add(id, 'hex');
|
||||||
|
}
|
||||||
|
|
||||||
if (this.peers.load)
|
if (this.peers.load)
|
||||||
this.peers.load.updateWatch();
|
this.peers.load.updateWatch();
|
||||||
for (var i = 0; i < this.peers.block.length; i++)
|
for (var i = 0; i < this.peers.block.length; i++)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user