Merge pull request #185 from cubedro/develop

Added bad block check
This commit is contained in:
Marian OANCΞA 2015-06-09 05:06:12 +03:00
commit 9e4a23c1f8
1 changed files with 14 additions and 0 deletions

View File

@ -126,6 +126,20 @@ History.prototype.add = function(block, id)
this._save(item);
changed = true;
}
else if(this._items.length > 0 && block.arrived - this.bestBlock().arrived > 10*60*1000)
{
this._items.splice(0,1);
item.propagTimes.push({
node: id,
received: now,
propagation: block.propagation
});
this._save(item);
changed = true;
}
}