mirror of https://github.com/BTCPrivate/z-nomp.git
Ensure configuration value for validation of pool workers is honored
This commit is contained in:
parent
575158f858
commit
634cfb7bff
|
@ -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){
|
|||
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue