fixed addHistory
This commit is contained in:
parent
97ab08f97b
commit
c0d0090d9d
5
app.js
5
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();
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user