Merge pull request #179 from cubedro/develop

Tweaked chain debounce
This commit is contained in:
Marian OANCΞA 2015-06-13 12:56:28 +03:00
commit 291c822702
1 changed files with 3 additions and 3 deletions

View File

@ -714,14 +714,14 @@ Node.prototype.setWatches = function()
console.info('>>>', 'Chain Filter triggered: ', chalk.reset.red(hash), '- last trigger:', chalk.reset.cyan(time)); console.info('>>>', 'Chain Filter triggered: ', chalk.reset.red(hash), '- last trigger:', chalk.reset.cyan(time));
if(time < 5) if(time < 50)
{ {
self._chainDebouncer++; self._chainDebouncer++;
} else { } else {
self._chainDebouncer = 0; self._chainDebouncer = 0;
} }
if(self._chainDebouncer < 20) if(self._chainDebouncer < 10)
{ {
self._latestQueue.push(hash); self._latestQueue.push(hash);
} }
@ -730,7 +730,7 @@ Node.prototype.setWatches = function()
debounce(function() { debounce(function() {
self._latestQueue.push(hash); self._latestQueue.push(hash);
self._chainDebouncer = 0; self._chainDebouncer = 0;
}, 5); }, 50);
} }
}); });