You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my admin userlist page, the readable hashrate was showing all of the array indices with the existing algorithm. So for example 1.24 KH/s would display as 1.24 h/s Kh/s Mh/s Gh/s Th/s Ph/s
I changed the function in api.js to this and got better results.
I'm not real familiar with git, otherwise I would have done a pull request with these changes.
function getReadableHashRateString(hashrate){
var displayrate = ["", "k", "M", "G", "T", "P"];
if(hashRate == 0) return '0 ';
var k = 1024,
i = Math.floor(Math.log(hashRate) / Math.log(k));
return parseFloat((hashRate/ Math.pow(k, i)).toFixed(2)) + ' ' + displayrate[i];
}
The text was updated successfully, but these errors were encountered:
On my admin userlist page, the readable hashrate was showing all of the array indices with the existing algorithm. So for example 1.24 KH/s would display as 1.24 h/s Kh/s Mh/s Gh/s Th/s Ph/s
I changed the function in api.js to this and got better results.
I'm not real familiar with git, otherwise I would have done a pull request with these changes.
function getReadableHashRateString(hashrate){
var displayrate = ["", "k", "M", "G", "T", "P"];
if(hashRate == 0) return '0 ';
var k = 1024,
i = Math.floor(Math.log(hashRate) / Math.log(k));
return parseFloat((hashRate/ Math.pow(k, i)).toFixed(2)) + ' ' + displayrate[i];
}
The text was updated successfully, but these errors were encountered: