Merge pull request #301 from cubedro/develop

better history handling
This commit is contained in:
Marian OANCΞA 2016-12-11 18:43:02 +02:00 committed by GitHub
commit 286378b4f4
2 changed files with 4 additions and 3 deletions

View File

@ -302,9 +302,9 @@ Collection.prototype.canNodeUpdate = function(id)
if(node.canUpdate())
{
var diff = this._blockchain.bestBlockNumber() - node.getBlockNumber();
var diff = node.getBlockNumber() - this._blockchain.bestBlockNumber();
return (diff <= 0);
return Boolean(diff >= 0);
}
return false;

View File

@ -634,7 +634,8 @@ History.prototype.getCharts = function()
History.prototype.requiresUpdate = function()
{
return ( this._items.length < MAX_HISTORY && !_.isEmpty(this._items) );
// return ( this._items.length < MAX_HISTORY && !_.isEmpty(this._items) );
return ( this._items.length < MAX_HISTORY );
}
History.prototype.getHistoryRequestRange = function()