Wrong hashrate calculation
Hashes are not bytes: > 1 byte = 8 bits > 1 kilobyte = 1024 bytes Hashes are the units, and so therefore - as `k`, `m` only mean *10^3 and *10^6 > 1 hash = 1 hash > 1 kh = 1000 hashes
This commit is contained in:
parent
eadc0fadf1
commit
c2ca8e4a80
|
@ -274,9 +274,9 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||
var i = -1;
|
||||
var byteUnits = [ ' KH', ' MH', ' GH', ' TH', ' PH' ];
|
||||
do {
|
||||
hashrate = hashrate / 1024;
|
||||
hashrate = hashrate / 1000;
|
||||
i++;
|
||||
} while (hashrate > 1024);
|
||||
} while (hashrate > 1000);
|
||||
return hashrate.toFixed(2) + byteUnits[i];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue