From 40951f63012debafd4c3ee4fda56998b0995cecd Mon Sep 17 00:00:00 2001 From: cubedro Date: Sat, 28 Mar 2015 19:46:06 +0200 Subject: [PATCH] added pending txs --- lib/node.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); });