removed unnecessary errors from stats
This commit is contained in:
parent
2208ba69ca
commit
cccde482f0
16
lib/node.js
16
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user