Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions coins/hdac.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "HDAC",
"symbol": "DAC",
"algorithm": "lyra2rev2",
/**
* @Hdac
* Add the 'reward' key value for ePoW, a unique consensus algorithm of Hdac.
* This annotation should be removed when reflecting on the server due to the JSON formatting convention.
*/
"reward": "ePoW"
}
121 changes: 121 additions & 0 deletions config-hdac.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"logLevel": "debug",
"logColors": true,

"cliHost": "127.0.0.1",
"cliPort": 17117,

"clustering": {
"enabled": true,
"forks": "auto"
},

/**
* @Hdac
* Add the 'blockWindowSizeRefreshInterval' key value.
* This is used to set the schedule period associated with ePOW application.
* This annotation should be removed when reflecting on the server due to the JSON formatting convention.
*/
"defaultPoolConfigs": {
"blockRefreshInterval": 1000,
"blockWindowSizeRefreshInterval": 50000,
"jobRebroadcastTimeout": 55,
"connectionTimeout": 600,
"emitInvalidBlockHashes": false,
"validateWorkerUsername": true,
"tcpProxyProtocol": false,
"banning": {
"enabled": false,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 500,
"purgeInterval": 300
},
"redis": {
"host": "127.0.0.1",
"port": 6379
}
},

"website": {
"enabled": true,
"host": "0.0.0.0",
"port": 8088,
"stratumHost": "0.0.0.0",
"stats": {
"updateInterval": 60,
"historicalRetention": 43200,
"hashrateWindow": 300
},
"adminCenter": {
"enabled": true,
"password": "password"
}
},

"redis": {
"host": "127.0.0.1",
"port": 6379
},

"switching": {
"switch1": {
"enabled": false,
"algorithm": "sha256",
"ports": {
"3333": {
"diff": 10,
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
}
},
"switch2": {
"enabled": false,
"algorithm": "scrypt",
"ports": {
"4444": {
"diff": 10,
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
}
},
"switch3": {
"enabled": false,
"algorithm": "x11",
"ports": {
"5555": {
"diff": 0.001,
"varDiff": {
"minDiff": 0.001,
"maxDiff": 1,
"targetTime": 15,
"retargetTime": 60,
"variancePercent": 30
}
}
}
}
},

"profitSwitch": {
"enabled": false,
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
"useCryptsy": true,
"useMintpal": true,
"useBittrex": true
}
}
28 changes: 21 additions & 7 deletions libs/paymentProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,23 @@ function SetupForPool(logger, poolOptions, setupFinished) {
}
else if (!result.response || !result.response.ismine) {
logger.error(logSystem, logComponent,
'Daemon does not own pool address - payment processing can not be done with this daemon, '
'Validateaddress failed, trying for newer getaddressinfo Command ..., '
+ JSON.stringify(result.response));
callback(true);
daemon.cmd('getaddressinfo', [poolOptions.address], function(result) {
if (result.error){
logger.error(logSystem, logComponent, 'Error with payment processing daemon, getaddressinfo failed ... ' + JSON.stringify(result.error));
callback(true);
}
else if (!result.response || !result.response.ismine) {
logger.error(logSystem, logComponent,
'Daemon does not own pool address - payment processing can not be done with this daemon, '
+ JSON.stringify(result.response));
callback(true);
}
else{
callback()
}
}, true);
}
else {
callback()
Expand Down Expand Up @@ -234,16 +248,16 @@ function SetupForPool(logger, poolOptions, setupFinished) {
round.category = 'kicked';
return;
}
else if (!tx.result.details || (tx.result.details && tx.result.details.length === 0)) {
logger.warning(logSystem, logComponent, 'Daemon reports no details for transaction: ' + round.txHash);
round.category = 'kicked';
return;
}
else if (tx.error || !tx.result) {
logger.error(logSystem, logComponent, 'Odd error with gettransaction ' + round.txHash + ' '
+ JSON.stringify(tx));
return;
}
else if (!tx.result.details || (tx.result.details && tx.result.details.length === 0)) {
logger.warning(logSystem, logComponent, 'Daemon reports no details for transaction: ' + round.txHash);
round.category = 'kicked';
return;
}

var generationTx = tx.result.details.filter(function (tx) {
return tx.address === poolOptions.address;
Expand Down
2 changes: 1 addition & 1 deletion libs/poolWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = function(logger){
else {
pool.daemon.cmd('validateaddress', [workerName], function (results) {
var isValid = results.filter(function (r) {
return r.response.isvalid
return r.response && r.response.isvalid;
}).length > 0;
authCallback(isValid);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"nonce": "^1.0.4",
"redis": "^2.7.1",
"request": "^2.83.0",
"stratum-pool": "git://github.com/foxer666/node-stratum-pool.git"
"stratum-pool": "git://github.com/OpenCommunityCoin/node-stratum-pool.git"
},
"engines": {
"node": ">=8.1.4"
Expand Down
Loading