Setting up port disable/lockout from the SQL into the main code base for the pool. Also making it so the API won't list a non-used pool type.

master
Alexander Blair 7 years ago
parent e6b340a8c6
commit 7c79ceede5

@ -62,7 +62,17 @@ app.get('/pool/stats', function (req, res) {
let localCache = global.database.getCache('pool_stats_global');
delete(localCache.minerHistory);
delete(localCache.hashHistory);
res.json({pool_list: ['pplns', 'pps', 'solo'], pool_statistics: localCache});
let pool_list = [];
if(global.config.pps.enable === true){
pool_list.push('pps');
}
if(global.config.solo.enable === true){
pool_list.push('solo');
}
if(global.config.pplns.enable === true){
pool_list.push('pplns');
}
res.json({pool_list: pool_list, pool_statistics: localCache});
});
app.get('/pool/chart/hashrate', function (req, res) {

@ -715,6 +715,9 @@ if (cluster.isMaster) {
bannedIPs = [];
}, 60000);
async.each(global.config.ports, function (portData) {
if (global.config[portData.portType].enable !== true){
return;
}
let handleMessage = function (socket, jsonData, pushMessage) {
if (!jsonData.id) {
console.warn('Miner RPC request missing RPC id');

Loading…
Cancel
Save