Merge pull request #333 from kaosdynamics/patch-1

Wrong hashrate calculation
This commit is contained in:
Matthew Little 2014-08-04 13:20:48 -06:00
commit b955c0cc51
1 changed files with 2 additions and 2 deletions

View File

@ -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];
};