Fixed global hashrate problem
This commit is contained in:
parent
2b553d08b7
commit
314dacf98a
@ -20,7 +20,7 @@
|
|||||||
"enabled": true,
|
"enabled": true,
|
||||||
"siteTitle": "Cryppit",
|
"siteTitle": "Cryppit",
|
||||||
"port": 80,
|
"port": 80,
|
||||||
"statUpdateInterval": 3,
|
"statUpdateInterval": 5,
|
||||||
"hashrateWindow": 600
|
"hashrateWindow": 600
|
||||||
},
|
},
|
||||||
"proxy": {
|
"proxy": {
|
||||||
|
|||||||
@ -139,10 +139,10 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||||||
var shareMultiplier = algoMultipliers[coinStats.algorithm];
|
var shareMultiplier = algoMultipliers[coinStats.algorithm];
|
||||||
var hashratePre = shareMultiplier * coinStats.shares / portalConfig.website.hashrateWindow;
|
var hashratePre = shareMultiplier * coinStats.shares / portalConfig.website.hashrateWindow;
|
||||||
coinStats.hashrate = hashratePre / 1e3 | 0;
|
coinStats.hashrate = hashratePre / 1e3 | 0;
|
||||||
delete coinStats.hashrates;
|
|
||||||
delete coinStats.shares;
|
|
||||||
portalStats.global.hashrate += coinStats.hashrate;
|
portalStats.global.hashrate += coinStats.hashrate;
|
||||||
portalStats.global.workers += Object.keys(coinStats.workers).length;
|
portalStats.global.workers += Object.keys(coinStats.workers).length;
|
||||||
|
delete coinStats.hashrates;
|
||||||
|
delete coinStats.shares;
|
||||||
});
|
});
|
||||||
|
|
||||||
_this.stats = portalStats;
|
_this.stats = portalStats;
|
||||||
|
|||||||
@ -55,7 +55,8 @@ module.exports = function(logger){
|
|||||||
portalConfig: portalConfig
|
portalConfig: portalConfig
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
logger.debug(logSystem, 'Stats', 'Website updated to latest stats');
|
|
||||||
|
//logger.debug(logSystem, 'Stats', 'Website updated to latest stats');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,28 @@
|
|||||||
"txRefreshInterval": 20000,
|
"txRefreshInterval": 20000,
|
||||||
"connectionTimeout": 600,
|
"connectionTimeout": 600,
|
||||||
|
|
||||||
|
"shareProcessing": {
|
||||||
|
"internal": {
|
||||||
|
"enabled": true,
|
||||||
|
"validateWorkerAddress": true,
|
||||||
|
"paymentInterval": 10,
|
||||||
|
"minimumPayment": 100.001,
|
||||||
|
"minimumReserve": 10,
|
||||||
|
"feePercent": 0.02,
|
||||||
|
"feeReceiveAddress": "GRAiuGCWLrL8Psdr6pkhLpxrQGHdYfrSEz",
|
||||||
|
"feeWithdrawalThreshold": 5,
|
||||||
|
"daemon": {
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 19632,
|
||||||
|
"user": "testuser",
|
||||||
|
"password": "testpass"
|
||||||
|
},
|
||||||
|
"redis": {
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 6379
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"ports": {
|
"ports": {
|
||||||
"3537": {
|
"3537": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user