|
|
@ -115,9 +115,34 @@ Collection.prototype.getNodeOrNew = function(search, data) |
|
|
|
|
|
|
|
|
|
|
|
Collection.prototype.all = function() |
|
|
|
Collection.prototype.all = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
this.removeOldNodes(); |
|
|
|
|
|
|
|
|
|
|
|
return this._items; |
|
|
|
return this._items; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Collection.prototype.removeOldNodes = function() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var deleteList = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i = this._items.length - 1; i >= 0; i--) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var node = this._items[i]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( node.isInactiveAndOld() ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
deleteList.push(i); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(deleteList.length > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
for(var i = 0; i < deleteList.length; i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this._items.splice(deleteList[i], 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Collection.prototype.blockPropagationChart = function() |
|
|
|
Collection.prototype.blockPropagationChart = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
return this._blockchain.getBlockPropagation(); |
|
|
|
return this._blockchain.getBlockPropagation(); |
|
|
|