added bad block check
This commit is contained in:
parent
c0d0090d9d
commit
c26ba17cd4
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user