Merge remote-tracking branch 'origin/master'

This commit is contained in:
Matt 2014-04-05 18:33:52 -06:00
commit ab41056c4b
2 changed files with 10 additions and 7 deletions

View File

@ -87,10 +87,14 @@ module.exports = function(logger){
var shareProcessor = new ShareProcessor(logger, poolOptions) var shareProcessor = new ShareProcessor(logger, poolOptions)
handlers.auth = function(workerName, password, authCallback){ handlers.auth = function(workerName, password, authCallback){
pool.daemon.cmd('validateaddress', [workerName], function(results){ if (shareProcessing.internal.validateWorkerAddress !== true)
var isValid = results.filter(function(r){return r.response.isvalid}).length > 0; authCallback(true);
authCallback(isValid); else {
}); pool.daemon.cmd('validateaddress', [workerName], function(results){
var isValid = results.filter(function(r){return r.response.isvalid}).length > 0;
authCallback(isValid);
});
}
}; };
handlers.share = function(isValidShare, isValidBlock, data){ handlers.share = function(isValidShare, isValidBlock, data){
@ -171,4 +175,4 @@ module.exports = function(logger){
} }
}; };

View File

@ -91,7 +91,7 @@ module.exports = function(logger, portalConfig, poolConfigs){
symbol: poolConfigs[coinName].coin.symbol.toUpperCase(), symbol: poolConfigs[coinName].coin.symbol.toUpperCase(),
algorithm: poolConfigs[coinName].coin.algorithm, algorithm: poolConfigs[coinName].coin.algorithm,
hashrates: replies[i + 1], hashrates: replies[i + 1],
poolStats: replies[i + 2], poolStats: replies[i + 2] != null ? replies[i + 2] : { validShares: 0, validBlocks: 0, invalidShares: 0 },
blocks: { blocks: {
pending: replies[i + 3], pending: replies[i + 3],
confirmed: replies[i + 4], confirmed: replies[i + 4],
@ -178,4 +178,3 @@ module.exports = function(logger, portalConfig, poolConfigs){
}; };
}; };