Merge pull request #103 from cubedro/develop

Less useless logs
This commit is contained in:
Marian OANCΞA 2015-04-28 04:05:42 +03:00
commit 3417086545
2 changed files with 2 additions and 18 deletions

7
app.js
View File

@ -74,9 +74,6 @@ api.on('connection', function(spark) {
spark.on('update', function(data) spark.on('update', function(data)
{ {
console.log('Latency: ', spark.latency);
console.log('Got update from ' + spark.id);
if(typeof data.id !== 'undefined' && typeof data.stats !== 'undefined') if(typeof data.id !== 'undefined' && typeof data.stats !== 'undefined')
{ {
data.stats.latency = spark.latency; data.stats.latency = spark.latency;
@ -118,10 +115,6 @@ api.on('connection', function(spark) {
}); });
client.on('connection', function(spark) { client.on('connection', function(spark) {
console.log(spark.id);
console.log(spark.address);
console.log(spark.query);
spark.on('ready', function(data){ spark.on('ready', function(data){
spark.emit('init', {nodes: Nodes.all()}); spark.emit('init', {nodes: Nodes.all()});

View File

@ -188,7 +188,7 @@ History.prototype.getUncleCount = function(id)
History.prototype.getTransactionsCount = function(id) History.prototype.getTransactionsCount = function(id)
{ {
var uncles = _(this._items) var txCount = _(this._items)
.sortByOrder('height', false) .sortByOrder('height', false)
.slice(0, MAX_BINS - 1) .slice(0, MAX_BINS - 1)
.reverse() .reverse()
@ -198,16 +198,7 @@ History.prototype.getTransactionsCount = function(id)
}) })
.value(); .value();
var uncleBins = _.fill(Array(MAX_BINS), 0); return txCount;
var sumMapper = function(array, key) {
uncleBins[key] = _.sum(array);
return _.sum(array);
};
_.map(_.chunk(uncles, MAX_UNCLES_PER_BIN), sumMapper);
return uncleBins;
} }
History.prototype.history = function() History.prototype.history = function()