Probably fixed negative hashrate issue
This commit is contained in:
parent
50a560d92f
commit
a279fb486f
@ -108,6 +108,7 @@ If your pool uses NOMP let us know and we will list your website here.
|
|||||||
* http://suchpool.pw
|
* http://suchpool.pw
|
||||||
* http://hashfaster.com
|
* http://hashfaster.com
|
||||||
* http://miningpoolhub.com
|
* http://miningpoolhub.com
|
||||||
|
* http://teamdoge.com
|
||||||
* http://kryptochaos.com
|
* http://kryptochaos.com
|
||||||
* http://pool.uberpools.org
|
* http://pool.uberpools.org
|
||||||
|
|
||||||
|
|||||||
4
init.js
4
init.js
@ -296,8 +296,8 @@ var startWebsite = function(portalConfig, poolConfigs){
|
|||||||
|
|
||||||
var startProfitSwitch = function(portalConfig, poolConfigs){
|
var startProfitSwitch = function(portalConfig, poolConfigs){
|
||||||
|
|
||||||
if (!portalConfig.profitSwitch.enabled){
|
if (!portalConfig.profitSwitch || !portalConfig.profitSwitch.enabled){
|
||||||
logger.error('Master', 'Profit', 'Profit auto switching disabled');
|
//logger.error('Master', 'Profit', 'Profit auto switching disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -219,7 +219,7 @@ module.exports = function(logger){
|
|||||||
redisClient.on('ready', function(){
|
redisClient.on('ready', function(){
|
||||||
redisClient.hgetall("proxyState", function(error, obj) {
|
redisClient.hgetall("proxyState", function(error, obj) {
|
||||||
if (error || obj == null) {
|
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 {
|
else {
|
||||||
proxyState = obj;
|
proxyState = obj;
|
||||||
@ -276,7 +276,7 @@ module.exports = function(logger){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.debug(logSystem, logComponent, logSubCat, 'Proxy pool for ' + algorithm + ' disabled.');
|
//logger.debug(logSystem, logComponent, logSubCat, 'Proxy pool for ' + algorithm + ' disabled.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -191,9 +191,10 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||||||
else
|
else
|
||||||
coinStats.workers[worker] = workerShares;
|
coinStats.workers[worker] = workerShares;
|
||||||
});
|
});
|
||||||
|
|
||||||
var shareMultiplier = Math.pow(2, 32) / algos[coinStats.algorithm].multiplier;
|
var shareMultiplier = Math.pow(2, 32) / algos[coinStats.algorithm].multiplier;
|
||||||
var hashratePre = shareMultiplier * coinStats.shares / portalConfig.website.stats.hashrateWindow;
|
coinStats.hashrate = shareMultiplier * coinStats.shares / portalConfig.website.stats.hashrateWindow;
|
||||||
coinStats.hashrate = hashratePre | 0;
|
|
||||||
coinStats.workerCount = Object.keys(coinStats.workers).length;
|
coinStats.workerCount = Object.keys(coinStats.workers).length;
|
||||||
portalStats.global.workers += coinStats.workerCount;
|
portalStats.global.workers += coinStats.workerCount;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-open-mining-portal",
|
"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",
|
"description": "An extremely efficient, highly scalable, all-in-one, easy to setup cryptocurrency mining pool",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"stratum",
|
"stratum",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user