Merge pull request #41 from bluecircle/bluecircle

Ensure configuration value for validation of pool workers is honored
This commit is contained in:
Matthew Little 2014-04-05 17:45:11 -06:00
commit fabf823727
1 changed files with 9 additions and 5 deletions

View File

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