diff --git a/app.js b/app.js index 5c40fa2..3f87862 100644 --- a/app.js +++ b/app.js @@ -316,7 +316,8 @@ api.on('connection', function (spark) { if( !_.isUndefined(data.id) ) { - Nodes.updateLatency(data.id, data.latency, function (err, latency) { + Nodes.updateLatency(data.id, data.latency, function (err, latency) + { if(err !== null) { console.error('API', 'PIN', 'Latency error:', err); @@ -333,7 +334,7 @@ api.on('connection', function (spark) } }); - if( Nodes.requiresUpdate(data.id) && (!Nodes.askedForHistory() || _.now() - askedForHistoryTime > 60*1000) ) + if( Nodes.requiresUpdate(data.id) && (!Nodes.askedForHistory() || _.now() - askedForHistoryTime > 2*60*1000) ) { var range = Nodes.getHistory().getHistoryRequestRange(); diff --git a/lib/collection.js b/lib/collection.js index 42d5c51..ab22335 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -118,7 +118,7 @@ Collection.prototype.addHistory = function(id, blocks, callback) this._blockchain.add(blocks[i], id); }; - this.getCharts(callback); + this.getCharts(); } this.askedForHistory(false);