From dc3dcd01a7aef20b2f2d7a2270e85680db302e29 Mon Sep 17 00:00:00 2001 From: Jerry Brady Date: Sat, 5 Apr 2014 23:43:02 +0000 Subject: [PATCH] Ensure configuration value for validation of pool workers is honored --- libs/poolWorker.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libs/poolWorker.js b/libs/poolWorker.js index d288375..fb18fea 100644 --- a/libs/poolWorker.js +++ b/libs/poolWorker.js @@ -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){ } -}; \ No newline at end of file +};