garbage collection.
This commit is contained in:
parent
42c8dd934e
commit
4211499b0e
@ -306,6 +306,9 @@ Bitcoin.prototype._pollBlocks = function() {
|
||||
|
||||
// XXX Bad workaround
|
||||
if (self._emitted[block.hash]) {
|
||||
if (Object.keys(self._emitted[block.hash]).length > 10000) {
|
||||
self._emitted = {};
|
||||
}
|
||||
return setImmediate(function() {
|
||||
return nextBlock();
|
||||
});
|
||||
@ -353,6 +356,9 @@ Bitcoin.prototype._pollMempool = function() {
|
||||
|
||||
// XXX Bad workaround
|
||||
if (self._emitted[tx.txid]) {
|
||||
if (Object.keys(self._emitted[block.hash]).length > 10000) {
|
||||
self._emitted = {};
|
||||
}
|
||||
return setImmediate(function() {
|
||||
return nextTx();
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user