pool: do not set witness bit for FILTERED_BLOCK. see #88.

This commit is contained in:
Christopher Jeffrey 2016-11-10 13:42:27 -08:00
parent f7be57b583
commit cf949569ae
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -217,14 +217,15 @@ Pool.prototype._initOptions = function _initOptions() {
if (this.options.preferredSeed)
this.hosts.addSeed(this.options.preferredSeed);
if (this.options.spv)
this.blockType = constants.inv.FILTERED_BLOCK;
if (this.options.witness) {
this.blockType |= constants.WITNESS_MASK;
this.txType |= constants.WITNESS_MASK;
}
// Note: No witness bit for merkleblocks.
if (this.options.spv)
this.blockType = constants.inv.FILTERED_BLOCK;
if (this.options.spv)
this.spvFilter = Bloom.fromRate(10000, 0.001, constants.bloom.ALL);