add gas limit chart
This commit is contained in:
@@ -436,6 +436,25 @@ History.prototype.getBlockTimes = function()
|
||||
return blockTimes;
|
||||
}
|
||||
|
||||
History.prototype.getGasLimit = function()
|
||||
{
|
||||
var gasLimitHistory = _( this._items )
|
||||
.sortByOrder( 'height', false )
|
||||
.filter(function (item)
|
||||
{
|
||||
return item.block.trusted;
|
||||
})
|
||||
.slice(0, MAX_BINS)
|
||||
.reverse()
|
||||
.map(function (item)
|
||||
{
|
||||
return item.block.gasLimit;
|
||||
})
|
||||
.value();
|
||||
|
||||
return gasLimitHistory;
|
||||
}
|
||||
|
||||
History.prototype.getDifficulty = function()
|
||||
{
|
||||
var difficultyHistory = _( this._items )
|
||||
@@ -570,6 +589,7 @@ History.prototype.getCharts = function()
|
||||
uncles: item.block.uncles.length,
|
||||
transactions: item.block.transactions.length,
|
||||
gasSpending: item.block.gasUsed,
|
||||
gasLimit: item.block.gasLimit,
|
||||
miner: item.block.miner
|
||||
};
|
||||
})
|
||||
@@ -583,6 +603,7 @@ History.prototype.getCharts = function()
|
||||
uncles : _.pluck( chartHistory, 'uncles' ),
|
||||
transactions : _.pluck( chartHistory, 'transactions' ),
|
||||
gasSpending : _.pluck( chartHistory, 'gasSpending' ),
|
||||
gasLimit : _.pluck( chartHistory, 'gasLimit' ),
|
||||
miners : this.getMinersCount(),
|
||||
propagation : this.getBlockPropagation(),
|
||||
uncleCount : this.getUncleCount(),
|
||||
|
||||
Reference in New Issue
Block a user