fixed propagation bug
This commit is contained in:
@@ -61,7 +61,6 @@ Collection.prototype.addBlock = function(id, stats, callback)
|
||||
|
||||
if (!block)
|
||||
{
|
||||
console.log(block);
|
||||
callback('Block undefined', null);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -110,14 +110,14 @@ History.prototype.add = function(block, id)
|
||||
block.time = 0;
|
||||
}
|
||||
|
||||
var item = {
|
||||
height: block.number,
|
||||
block: block,
|
||||
propagTimes: []
|
||||
}
|
||||
|
||||
if( this._items.length === 0 || block.number >= (this.bestBlockNumber() - MAX_HISTORY + 1) )
|
||||
{
|
||||
var item = {
|
||||
height: block.number,
|
||||
block: block,
|
||||
propagTimes: []
|
||||
}
|
||||
|
||||
item.propagTimes.push({
|
||||
node: id,
|
||||
received: now,
|
||||
|
||||
@@ -158,7 +158,6 @@ Node.prototype.setBlock = function(block, history, callback)
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log(block);
|
||||
callback('Block undefined', null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user