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