Probably fixed negative hashrate issue

This commit is contained in:
Matt 2014-04-23 12:53:19 -06:00
parent 50a560d92f
commit a279fb486f
5 changed files with 9 additions and 7 deletions

View File

@ -108,6 +108,7 @@ If your pool uses NOMP let us know and we will list your website here.
* http://suchpool.pw
* http://hashfaster.com
* http://miningpoolhub.com
* http://teamdoge.com
* http://kryptochaos.com
* http://pool.uberpools.org

View File

@ -296,8 +296,8 @@ var startWebsite = function(portalConfig, poolConfigs){
var startProfitSwitch = function(portalConfig, poolConfigs){
if (!portalConfig.profitSwitch.enabled){
logger.error('Master', 'Profit', 'Profit auto switching disabled');
if (!portalConfig.profitSwitch || !portalConfig.profitSwitch.enabled){
//logger.error('Master', 'Profit', 'Profit auto switching disabled');
return;
}

View File

@ -219,7 +219,7 @@ module.exports = function(logger){
redisClient.on('ready', function(){
redisClient.hgetall("proxyState", function(error, obj) {
if (error || obj == null) {
logger.debug(logSystem, logComponent, logSubCat, 'No last proxy state found in redis');
//logger.debug(logSystem, logComponent, logSubCat, 'No last proxy state found in redis');
}
else {
proxyState = obj;
@ -276,7 +276,7 @@ module.exports = function(logger){
});
}
else {
logger.debug(logSystem, logComponent, logSubCat, 'Proxy pool for ' + algorithm + ' disabled.');
//logger.debug(logSystem, logComponent, logSubCat, 'Proxy pool for ' + algorithm + ' disabled.');
}
});
});

View File

@ -191,9 +191,10 @@ module.exports = function(logger, portalConfig, poolConfigs){
else
coinStats.workers[worker] = workerShares;
});
var shareMultiplier = Math.pow(2, 32) / algos[coinStats.algorithm].multiplier;
var hashratePre = shareMultiplier * coinStats.shares / portalConfig.website.stats.hashrateWindow;
coinStats.hashrate = hashratePre | 0;
coinStats.hashrate = shareMultiplier * coinStats.shares / portalConfig.website.stats.hashrateWindow;
coinStats.workerCount = Object.keys(coinStats.workers).length;
portalStats.global.workers += coinStats.workerCount;

View File

@ -1,6 +1,6 @@
{
"name": "node-open-mining-portal",
"version": "0.0.3",
"version": "0.0.4",
"description": "An extremely efficient, highly scalable, all-in-one, easy to setup cryptocurrency mining pool",
"keywords": [
"stratum",