added miner result limit
This commit is contained in:
parent
7f2f722d5d
commit
a81bee9502
@ -36,6 +36,7 @@ var PENDING_WORKS = true;
|
|||||||
var MAX_BLOCKS_HISTORY = 36;
|
var MAX_BLOCKS_HISTORY = 36;
|
||||||
var UPDATE_INTERVAL = 5000;
|
var UPDATE_INTERVAL = 5000;
|
||||||
var PING_INTERVAL = 2000;
|
var PING_INTERVAL = 2000;
|
||||||
|
var MINERS_LIMIT = 5;
|
||||||
|
|
||||||
function Node()
|
function Node()
|
||||||
{
|
{
|
||||||
@ -312,7 +313,9 @@ Node.prototype.minersChart = function()
|
|||||||
minersArray.push({miner: miner, blocks: cnt});
|
minersArray.push({miner: miner, blocks: cnt});
|
||||||
});
|
});
|
||||||
|
|
||||||
return _.sortBy(minersArray, 'blocks').reverse();
|
var minersArray = _.sortBy(minersArray, 'blocks').reverse();
|
||||||
|
|
||||||
|
return minersArray.slice(0, MINERS_LIMIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
Node.prototype.uptime = function()
|
Node.prototype.uptime = function()
|
||||||
|
Loading…
Reference in New Issue
Block a user