From cccde482f0e5d084cc185b093e50adfcd057e6e8 Mon Sep 17 00:00:00 2001 From: cubedro Date: Thu, 16 Apr 2015 22:15:42 +0300 Subject: [PATCH] removed unnecessary errors from stats --- lib/node.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/node.js b/lib/node.js index 8bb6807..dcab97b 100644 --- a/lib/node.js +++ b/lib/node.js @@ -81,8 +81,7 @@ function Node() blockTimes: [], gasSpending: [], miners: [], - uptime: 0, - errors: [] + uptime: 0 }; this._lastStats = JSON.stringify(this.stats); @@ -141,7 +140,6 @@ function Node() Node.prototype.isActive = function() { this._tries++; - this.stats.errors = []; try { var peers = web3.toDecimal(web3.net.peerCount); @@ -155,10 +153,6 @@ Node.prototype.isActive = function() } } catch (err) { - this.stats.errors.push({ - code: '1', - msg: err - }); console.error("peerCount:", err); } @@ -188,10 +182,6 @@ Node.prototype.getBlock = function(number) return this.stats.block; } catch (err) { - this.stats.errors.push({ - code: '3', - msg: err - }); console.error("blockNumber:", err); } } @@ -205,10 +195,6 @@ Node.prototype.getBlock = function(number) } } catch (err) { - this.stats.errors.push({ - code: '2', - msg: err - }); console.error("getBlock:", err); }