|
|
@ -371,10 +371,10 @@ History.prototype.getUncleCount = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
var uncles = _( this._items ) |
|
|
|
var uncles = _( this._items ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.filter(function (item) |
|
|
|
// .filter(function (item)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
return item.block.trusted; |
|
|
|
// return item.block.trusted;
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
.slice(0, MAX_UNCLES) |
|
|
|
.slice(0, MAX_UNCLES) |
|
|
|
.map(function (item) |
|
|
|
.map(function (item) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -399,10 +399,10 @@ History.prototype.getBlockTimes = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
var blockTimes = _( this._items ) |
|
|
|
var blockTimes = _( this._items ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.filter(function (item) |
|
|
|
// .filter(function (item)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
return item.block.trusted; |
|
|
|
// return item.block.trusted;
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
.slice(0, MAX_BINS) |
|
|
|
.slice(0, MAX_BINS) |
|
|
|
.reverse() |
|
|
|
.reverse() |
|
|
|
.map(function (item) |
|
|
|
.map(function (item) |
|
|
@ -478,10 +478,10 @@ History.prototype.getAvgHashrate = function() |
|
|
|
|
|
|
|
|
|
|
|
var blocktimeHistory = _( this._items ) |
|
|
|
var blocktimeHistory = _( this._items ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.filter(function (item) |
|
|
|
// .filter(function (item)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
return item.block.trusted; |
|
|
|
// return item.block.trusted;
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
.slice(0, 64) |
|
|
|
.slice(0, 64) |
|
|
|
.map(function (item) |
|
|
|
.map(function (item) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -498,10 +498,10 @@ History.prototype.getMinersCount = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
var miners = _( this._items ) |
|
|
|
var miners = _( this._items ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.filter(function (item) |
|
|
|
// .filter(function (item)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
return item.block.trusted; |
|
|
|
// return item.block.trusted;
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
.slice(0, MAX_BINS) |
|
|
|
.slice(0, MAX_BINS) |
|
|
|
.map(function (item) |
|
|
|
.map(function (item) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -533,10 +533,10 @@ History.prototype.getCharts = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
var chartHistory = _( this._items ) |
|
|
|
var chartHistory = _( this._items ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.sortByOrder( 'height', false ) |
|
|
|
.filter(function (item) |
|
|
|
// .filter(function (item)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
return item.block.trusted; |
|
|
|
// return item.block.trusted;
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
.slice(0, MAX_BINS) |
|
|
|
.slice(0, MAX_BINS) |
|
|
|
.reverse() |
|
|
|
.reverse() |
|
|
|
.map(function (item) |
|
|
|
.map(function (item) |
|
|
|