removed unnecessary errors from stats

This commit is contained in:
cubedro 2015-04-16 22:15:42 +03:00
parent 2208ba69ca
commit cccde482f0

View File

@ -81,8 +81,7 @@ function Node()
blockTimes: [], blockTimes: [],
gasSpending: [], gasSpending: [],
miners: [], miners: [],
uptime: 0, uptime: 0
errors: []
}; };
this._lastStats = JSON.stringify(this.stats); this._lastStats = JSON.stringify(this.stats);
@ -141,7 +140,6 @@ function Node()
Node.prototype.isActive = function() Node.prototype.isActive = function()
{ {
this._tries++; this._tries++;
this.stats.errors = [];
try { try {
var peers = web3.toDecimal(web3.net.peerCount); var peers = web3.toDecimal(web3.net.peerCount);
@ -155,10 +153,6 @@ Node.prototype.isActive = function()
} }
} }
catch (err) { catch (err) {
this.stats.errors.push({
code: '1',
msg: err
});
console.error("peerCount:", err); console.error("peerCount:", err);
} }
@ -188,10 +182,6 @@ Node.prototype.getBlock = function(number)
return this.stats.block; return this.stats.block;
} }
catch (err) { catch (err) {
this.stats.errors.push({
code: '3',
msg: err
});
console.error("blockNumber:", err); console.error("blockNumber:", err);
} }
} }
@ -205,10 +195,6 @@ Node.prototype.getBlock = function(number)
} }
} }
catch (err) { catch (err) {
this.stats.errors.push({
code: '2',
msg: err
});
console.error("getBlock:", err); console.error("getBlock:", err);
} }