diff --git a/lib/node.js b/lib/node.js index a1a9292..5ad9dc1 100644 --- a/lib/node.js +++ b/lib/node.js @@ -294,6 +294,7 @@ Node.prototype.getStats = function() if(this.stats.block.number > 0) this.getLatestBlocks(); + self.stats.pending = web3.eth.getBlockTransactionCount('pending'); this.stats.mining = web3.eth.mining; this.stats.gasPrice = web3.eth.gasPrice.toString(10); this.stats.listening = web3.net.listening; @@ -345,14 +346,11 @@ Node.prototype.setWatches = function() this.pendingFilter = web3.eth.filter('pending'); this.pendingFilter.watch( function(log) { - console.log('pending changed:', log); - // console.log(self.pendingFilter.get()); - // self.stats.pending = parseInt(log.number); + self.update(); }); this.chainFilter = web3.eth.filter('latest'); this.chainFilter.watch(function(log) { - console.log('block changed:', log); self.update(); });