added gas spending in history
This commit is contained in:
parent
d1d8603fd9
commit
1e9d860c3d
@ -201,6 +201,21 @@ History.prototype.getTransactionsCount = function(id)
|
||||
return txCount;
|
||||
}
|
||||
|
||||
History.prototype.getGasSpending = function(id)
|
||||
{
|
||||
var gasSpending = _(this._items)
|
||||
.sortByOrder('height', false)
|
||||
.slice(0, MAX_BINS - 1)
|
||||
.reverse()
|
||||
.map(function(item)
|
||||
{
|
||||
return item.block.gasUsed;
|
||||
})
|
||||
.value();
|
||||
|
||||
return gasSpending;
|
||||
}
|
||||
|
||||
History.prototype.getDifficulty = function(id)
|
||||
{
|
||||
var difficultyHistory = _(this._items)
|
||||
|
Loading…
Reference in New Issue
Block a user