switch back to rolling filters.

This commit is contained in:
Christopher Jeffrey 2016-05-20 16:11:17 -07:00
parent d8800632ea
commit 14b2b528f3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 4 additions and 4 deletions

View File

@ -100,8 +100,8 @@ function Peer(pool, options) {
this.relay = true; this.relay = true;
this.localNonce = utils.nonce(); this.localNonce = utils.nonce();
this.filterRate = -1; this.filterRate = -1;
this.addrFilter = bcoin.bloom.fromRate(5000, 0.001, -1); this.addrFilter = new bcoin.bloom.rolling(5000, 0.001);
this.invFilter = bcoin.bloom.fromRate(50000, 0.000001, -1); this.invFilter = new bcoin.bloom.rolling(50000, 0.000001);
this.challenge = null; this.challenge = null;
this.lastPong = -1; this.lastPong = -1;

View File

@ -167,12 +167,12 @@ function Pool(options) {
this.tx = { this.tx = {
filter: !this.mempool filter: !this.mempool
? bcoin.bloom.fromRate(50000, 0.000001, -1) ? new bcoin.bloom.rolling(50000, 0.000001)
: null, : null,
type: constants.inv.TX 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) { if (this.options.witness) {
this.block.type |= constants.WITNESS_MASK; this.block.type |= constants.WITNESS_MASK;