Skip to content

Commit 5d3ed04

Browse files
authored
Merge pull request cubedro#302 from cubedro/develop
fixed buggy if
2 parents 286378b + 941c17a commit 5d3ed04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/history.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ History.prototype.add = function(block, id, trusted, addingHistory)
169169
propagTimes: []
170170
}
171171

172-
if( this._items.length === 0 || (this._items.length === MAX_HISTORY && block.number > this.worstBlockNumber() && !addingHistory) || (this._items.length < MAX_HISTORY && block.number < this.bestBlockNumber()) )
172+
if( this._items.length === 0 || (this._items.length === MAX_HISTORY && block.number > this.worstBlockNumber()) || (this._items.length < MAX_HISTORY && block.number < this.bestBlockNumber() && addingHistory) )
173173
{
174174
item.propagTimes.push({
175175
node: id,

0 commit comments

Comments
 (0)