From 941c17a201dc40c14ec471ac39d2776424f6666a Mon Sep 17 00:00:00 2001 From: cubedro Date: Sun, 11 Dec 2016 22:29:03 +0200 Subject: [PATCH] fixed buggy if --- lib/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/history.js b/lib/history.js index 182c8e2..f71d61a 100644 --- a/lib/history.js +++ b/lib/history.js @@ -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,