locker. options.
This commit is contained in:
parent
1898b38c49
commit
d1d92b9b64
@ -63,6 +63,10 @@ Chain.prototype._init = function _init() {
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
this.locker.on('purge', function(total, size) {
|
||||
bcoin.debug('Warning: %dmb of pending objects. Purging.', utils.mb(size));
|
||||
});
|
||||
|
||||
// Hook into events for debugging
|
||||
this.on('block', function(block, entry) {
|
||||
if (self.height < 400000)
|
||||
|
||||
@ -34,16 +34,14 @@ function ldb(options) {
|
||||
cacheSize: options.cacheSize || (8 << 20),
|
||||
writeBufferSize: options.writeBufferSize || (4 << 20),
|
||||
maxOpenFiles: options.maxOpenFiles || 8192,
|
||||
filterBits: 0,
|
||||
paranoidChecks: false,
|
||||
|
||||
// For LMDB if we decide to use it:
|
||||
sync: options.sync || false,
|
||||
mapSize: options.mapSize || 150 * (1024 << 20),
|
||||
writeMap: options.writeMap || false,
|
||||
|
||||
// For RocksDB
|
||||
// optimizeCompaction: 'level',
|
||||
// memtableBudget: 512 << 20,
|
||||
|
||||
db: getBackend(options.db)
|
||||
});
|
||||
}
|
||||
|
||||
@ -104,8 +104,7 @@ Locker.prototype.purgePending = function purgePending() {
|
||||
|
||||
assert(this.add);
|
||||
|
||||
bcoin.debug('Warning: %dmb of pending objects. Purging.',
|
||||
utils.mb(this.pendingSize));
|
||||
this.emit('purge', total, this.pendingSize);
|
||||
|
||||
this.pending.forEach(function(obj) {
|
||||
delete self.pendingMap[obj.hash('hex')];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user