diff --git a/lib/chain/chaindb.js b/lib/chain/chaindb.js index 1290f8ce..13c5f987 100644 --- a/lib/chain/chaindb.js +++ b/lib/chain/chaindb.js @@ -196,7 +196,7 @@ function ChainDB(chain) { // We want to keep the last 5 blocks of unspents in memory. this.coinWindow = 25 << 20; - this.coinCache = new LRU.nil(); + this.coinCache = new LRU.Nil(); this.cacheHash = new LRU(this.cacheWindow); this.cacheHeight = new LRU(this.cacheWindow); diff --git a/lib/mempool/mempool.js b/lib/mempool/mempool.js index 1cb58a7e..0a1c4f8f 100644 --- a/lib/mempool/mempool.js +++ b/lib/mempool/mempool.js @@ -91,7 +91,7 @@ function Mempool(options) { this.coinIndex = new AddressIndex(this); this.txIndex = new AddressIndex(this); - this.rejects = new Bloom.rolling(120000, 0.000001); + this.rejects = new Bloom.Rolling(120000, 0.000001); this.freeCount = 0; this.lastTime = 0; diff --git a/lib/net/peer.js b/lib/net/peer.js index 0c8a8421..78585adf 100644 --- a/lib/net/peer.js +++ b/lib/net/peer.js @@ -99,8 +99,8 @@ function Peer(pool, addr, socket) { this.spvFilter = null; this.relay = true; this.feeRate = -1; - this.addrFilter = new Bloom.rolling(5000, 0.001); - this.invFilter = new Bloom.rolling(50000, 0.000001); + this.addrFilter = new Bloom.Rolling(5000, 0.001); + this.invFilter = new Bloom.Rolling(50000, 0.000001); this.lastBlock = null; this.waiting = 0; this.syncSent = false; diff --git a/lib/net/pool.js b/lib/net/pool.js index 9a10d96e..b20242f6 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -233,7 +233,7 @@ Pool.prototype._initOptions = function _initOptions() { this.spvFilter = Bloom.fromRate(10000, 0.001, constants.bloom.NONE); if (!this.options.mempool) - this.txFilter = new Bloom.rolling(50000, 0.000001); + this.txFilter = new Bloom.Rolling(50000, 0.000001); if (this.options.requestTimeout != null) this.requestTimeout = this.options.requestTimeout; diff --git a/lib/utils/bloom.js b/lib/utils/bloom.js index b225ad7f..d36627f8 100644 --- a/lib/utils/bloom.js +++ b/lib/utils/bloom.js @@ -374,6 +374,6 @@ function write(data, value, off) { exports = Bloom; exports.murmur3 = murmur3; -exports.rolling = RollingFilter; +exports.Rolling = RollingFilter; module.exports = exports; diff --git a/lib/utils/locker.js b/lib/utils/locker.js index 9f5e2fcb..c65c9f1b 100644 --- a/lib/utils/locker.js +++ b/lib/utils/locker.js @@ -265,6 +265,6 @@ MappedLock.prototype.destroy = function destroy() { */ exports = Locker; -exports.mapped = MappedLock; +exports.Mapped = MappedLock; module.exports = exports; diff --git a/lib/utils/lru.js b/lib/utils/lru.js index 55ea9984..82065f74 100644 --- a/lib/utils/lru.js +++ b/lib/utils/lru.js @@ -361,6 +361,6 @@ NullCache.prototype.toArray = function toArray(key) { return []; }; * Expose */ -LRU.nil = NullCache; +LRU.Nil = NullCache; module.exports = LRU; diff --git a/lib/wallet/walletdb.js b/lib/wallet/walletdb.js index 5fe559ad..cb5ba1db 100644 --- a/lib/wallet/walletdb.js +++ b/lib/wallet/walletdb.js @@ -152,7 +152,7 @@ function WalletDB(options) { // We need one read lock for `get` and `create`. // It will hold locks specific to wallet ids. - this.readLock = new Locker.mapped(); + this.readLock = new Locker.Mapped(); this.writeLock = new Locker(); this.txLock = new Locker(); diff --git a/test/bloom-test.js b/test/bloom-test.js index 679862b8..b5136ba6 100644 --- a/test/bloom-test.js +++ b/test/bloom-test.js @@ -89,7 +89,7 @@ describe('Bloom', function() { }); it('should handle 1m ops with rolling filter', function() { - var filter = new bcoin.bloom.rolling(210000, 0.00001); + var filter = new bcoin.bloom.Rolling(210000, 0.00001); filter.tweak = 0xdeadbeef; // ~1m operations for (var i = 0; i < 1000; i++) { @@ -105,7 +105,7 @@ describe('Bloom', function() { }); it('should handle rolling generations', function() { - var filter = new bcoin.bloom.rolling(50, 0.00001); + var filter = new bcoin.bloom.Rolling(50, 0.00001); filter.tweak = 0xdeadbeee; for (var i = 0; i < 25; i++) { var str = 'foobar' + i;