Changed stats to use algo multiplier
This commit is contained in:
parent
167be4baf0
commit
e58689956d
|
@ -302,8 +302,8 @@ Description of options:
|
|||
job broadcast. */
|
||||
"txRefreshInterval": 20000,
|
||||
|
||||
/* Some miner software is bugged and will consider the pool offline if it doesn't receive
|
||||
anything for around a minute, so every time we broadcast jobs, set a timeout to rebroadcast
|
||||
/* Some miner apps will consider the pool dead/offline if it doesn't receive anything new jobs
|
||||
for around a minute, so every time we broadcast jobs, set a timeout to rebroadcast
|
||||
in this many seconds unless we find a new job. Set to zero or remove to disable this. */
|
||||
"jobRebroadcastTimeout": 55,
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ module.exports = function(logger){
|
|||
|
||||
//Functions required for MPOS compatibility
|
||||
if (shareProcessing && shareProcessing.mpos && shareProcessing.mpos.enabled){
|
||||
var mposCompat = new MposCompatibility(logger, poolOptions)
|
||||
var mposCompat = new MposCompatibility(logger, poolOptions);
|
||||
|
||||
handlers.auth = function(workerName, password, authCallback){
|
||||
mposCompat.handleAuth(workerName, password, authCallback);
|
||||
|
@ -135,7 +135,7 @@ module.exports = function(logger){
|
|||
//Functions required for internal payment processing
|
||||
else if (shareProcessing && shareProcessing.internal && shareProcessing.internal.enabled){
|
||||
|
||||
var shareProcessor = new ShareProcessor(logger, poolOptions)
|
||||
var shareProcessor = new ShareProcessor(logger, poolOptions);
|
||||
|
||||
handlers.auth = function(workerName, password, authCallback){
|
||||
if (shareProcessing.internal.validateWorkerAddress !== true)
|
||||
|
@ -215,7 +215,7 @@ module.exports = function(logger){
|
|||
// on the last pool it was using when reloaded or restarted
|
||||
//
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Loading last proxy state from redis');
|
||||
var redisClient = redis.createClient(portalConfig.redis.port, portalConfig.redis.host)
|
||||
var redisClient = redis.createClient(portalConfig.redis.port, portalConfig.redis.host);
|
||||
redisClient.on('ready', function(){
|
||||
redisClient.hgetall("proxyState", function(error, obj) {
|
||||
if (error || obj == null) {
|
||||
|
|
|
@ -191,7 +191,7 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||
else
|
||||
coinStats.workers[worker] = workerShares;
|
||||
});
|
||||
var shareMultiplier = algos[coinStats.algorithm].multiplier || 0;
|
||||
var shareMultiplier = Math.pow(2, 32) / algos[coinStats.algorithm].multiplier;
|
||||
var hashratePre = shareMultiplier * coinStats.shares / portalConfig.website.stats.hashrateWindow;
|
||||
coinStats.hashrate = hashratePre | 0;
|
||||
coinStats.workerCount = Object.keys(coinStats.workers).length;
|
||||
|
|
Loading…
Reference in New Issue