Bugfix: Hashrate incorrect
This commit is contained in:
parent
600881e993
commit
57617f106c
|
@ -35,7 +35,7 @@
|
|||
"port": 80,
|
||||
"stratumHost": "cryppit.com",
|
||||
"stats": {
|
||||
"updateInterval": 60,
|
||||
"updateInterval": 30,
|
||||
"historicalRetention": 43200,
|
||||
"hashrateWindow": 300
|
||||
},
|
||||
|
|
|
@ -274,9 +274,9 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||
var i = -1;
|
||||
var byteUnits = [ ' Sol',' KSol', ' MSol', ' GSol', ' TSol', ' PSol' ];
|
||||
do {
|
||||
hashrate = hashrate / 1024;
|
||||
hashrate = (hashrate * 2) / 1000000;
|
||||
i++;
|
||||
} while (hashrate > 1024);
|
||||
} while (hashrate > 1000);
|
||||
|
||||
return hashrate.toFixed(2) + byteUnits[i];
|
||||
};
|
||||
|
|
|
@ -70,11 +70,11 @@ function buildChartData(){
|
|||
|
||||
function getReadableHashRateString(hashrate){
|
||||
var i = -1;
|
||||
var byteUnits = [ ' Sol', ' KSol', ' MSol', ' GSol', ' TSol' ];
|
||||
var byteUnits = [ ' Sol',' KSol', ' MSol', ' GSol', ' TSol', ' PSol' ];
|
||||
do {
|
||||
hashrate = hashrate / 1024;
|
||||
hashrate = (hashrate * 2) / 1000000;
|
||||
i++;
|
||||
} while (hashrate > 1024);
|
||||
} while (hashrate > 1000);
|
||||
return Math.round(hashrate) + byteUnits[i];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue