Merge pull request #302 from cubedro/develop

fixed buggy if
This commit is contained in:
Marian OANCΞA 2016-12-11 22:29:21 +02:00 committed by GitHub
commit 5d3ed04c55

View File

@ -169,7 +169,7 @@ History.prototype.add = function(block, id, trusted, addingHistory)
propagTimes: []
}
if( this._items.length === 0 || (this._items.length === MAX_HISTORY && block.number > this.worstBlockNumber() && !addingHistory) || (this._items.length < MAX_HISTORY && block.number < this.bestBlockNumber()) )
if( this._items.length === 0 || (this._items.length === MAX_HISTORY && block.number > this.worstBlockNumber()) || (this._items.length < MAX_HISTORY && block.number < this.bestBlockNumber() && addingHistory) )
{
item.propagTimes.push({
node: id,