mirror of https://github.com/BTCPrivate/z-nomp.git
Merge pull request #41 from bluecircle/bluecircle
Ensure configuration value for validation of pool workers is honored
This commit is contained in:
commit
fabf823727
|
@ -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){
|
||||||
|
if (shareProcessing.internal.validateWorkerAddress !== true)
|
||||||
|
authCallback(true);
|
||||||
|
else {
|
||||||
pool.daemon.cmd('validateaddress', [workerName], function(results){
|
pool.daemon.cmd('validateaddress', [workerName], function(results){
|
||||||
var isValid = results.filter(function(r){return r.response.isvalid}).length > 0;
|
var isValid = results.filter(function(r){return r.response.isvalid}).length > 0;
|
||||||
authCallback(isValid);
|
authCallback(isValid);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
handlers.share = function(isValidShare, isValidBlock, data){
|
handlers.share = function(isValidShare, isValidBlock, data){
|
||||||
|
|
Loading…
Reference in New Issue