added pending txs
This commit is contained in:
parent
0a0e95df13
commit
40951f6301
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user