From ad2f50ac872bf18073ca174807cf4ab827148719 Mon Sep 17 00:00:00 2001 From: cubedro Date: Sun, 22 Mar 2015 23:16:30 +0200 Subject: [PATCH 1/2] fixed bugs --- lib/node.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node.js b/lib/node.js index 5b928e4..ec20183 100644 --- a/lib/node.js +++ b/lib/node.js @@ -119,7 +119,7 @@ Node.prototype.isActive = function() this.stats.errors = []; try { - var peers = web3.net.peerCount; + var peers = web3.toDecimal(web3.net.peerCount); if(peers !== null) { @@ -338,13 +338,13 @@ Node.prototype.setWatches = function() { var self = this; - this.pendingWatch = web3.eth.filter('pending'); - this.pendingWatch.watch( function(log) { - console.log(log); - // console.log(self.pendingWatch.get()); - // console.log('pending changed'); - // self.stats.pending = parseInt(log.number); - }); + // this.pendingWatch = web3.eth.filter('pending'); + // this.pendingWatch.watch( function(log) { + // console.log(log); + // // console.log(self.pendingWatch.get()); + // // console.log('pending changed'); + // // self.stats.pending = parseInt(log.number); + // }); // this.chainWatch = web3.eth.watch('chain'); // this.chainWatch.messages(function(log) { From 1ef0877d286a9c91314138022250eed12fd4fa68 Mon Sep 17 00:00:00 2001 From: cubedro Date: Sun, 22 Mar 2015 23:22:08 +0200 Subject: [PATCH 2/2] bug fix --- lib/node.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node.js b/lib/node.js index ec20183..63aaab8 100644 --- a/lib/node.js +++ b/lib/node.js @@ -380,13 +380,14 @@ Node.prototype.stop = function() if(this._socket) socket.end(); - web3.reset(); if(this.updateInterval) clearInterval(this.updateInterval); - if(this.pendingWatch) - this.pendingWatch.stopWatching(); + web3.reset(); + + // if(this.pendingWatch) + // this.pendingWatch.stopWatching(); // if(this.chainWatch) // this.chainWatch.uninstall();