diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index 70d2ff15..486b9954 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -100,8 +100,8 @@ function Peer(pool, options) { this.relay = true; this.localNonce = utils.nonce(); this.filterRate = -1; - this.addrFilter = bcoin.bloom.fromRate(5000, 0.001, -1); - this.invFilter = bcoin.bloom.fromRate(50000, 0.000001, -1); + this.addrFilter = new bcoin.bloom.rolling(5000, 0.001); + this.invFilter = new bcoin.bloom.rolling(50000, 0.000001); this.challenge = null; this.lastPong = -1; diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index 1fa0d62d..44cc8bd4 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -167,12 +167,12 @@ function Pool(options) { this.tx = { filter: !this.mempool - ? bcoin.bloom.fromRate(50000, 0.000001, -1) + ? new bcoin.bloom.rolling(50000, 0.000001) : null, type: constants.inv.TX }; - this.rejects = bcoin.bloom.fromRate(120000, 0.000001, -1); + this.rejects = new bcoin.bloom.rolling(120000, 0.000001); if (this.options.witness) { this.block.type |= constants.WITNESS_MASK;