pool: allow sending filterload to peers without an id to add to the bloom filter.

This commit is contained in:
Christopher Jeffrey 2014-05-20 04:08:57 -05:00
parent a5f20114e8
commit 24d9b2b2d8

View File

@ -348,6 +348,7 @@ Pool.prototype.watch = function watch(id) {
return; return;
} }
if (id) {
var hid = utils.toHex(id); var hid = utils.toHex(id);
if (this.watchMap[hid]) if (this.watchMap[hid])
this.watchMap[hid]++; this.watchMap[hid]++;
@ -357,8 +358,9 @@ Pool.prototype.watch = function watch(id) {
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++)