added debounce to 'latest' filter
This commit is contained in:
parent
c7e027d393
commit
f87a378b4d
@ -2,6 +2,7 @@ var web3 = require('ethereum.js');
|
||||
var _ = require('lodash');
|
||||
var os = require('os');
|
||||
var shelljs = require('shelljs');
|
||||
var debounce = require('debounce');
|
||||
|
||||
var Primus = require('primus'),
|
||||
Emitter = require('primus-emit'),
|
||||
@ -386,7 +387,9 @@ Node.prototype.setWatches = function()
|
||||
|
||||
this.chainFilter = web3.eth.filter('latest');
|
||||
this.chainFilter.watch(function(log) {
|
||||
self.update();
|
||||
debounce(function() {
|
||||
self.update();
|
||||
}, 50);
|
||||
});
|
||||
|
||||
this.updateInterval = setInterval(function(){
|
||||
|
@ -8,6 +8,7 @@
|
||||
"lib": "./lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"debounce": "^1.0.0",
|
||||
"debug": "~2.1.3",
|
||||
"ethereum.js": "0.2.4",
|
||||
"lodash": "^3.6.0",
|
||||
|
Loading…
Reference in New Issue
Block a user