From 62befe0168f77592f2ee24a26fdcd0074c54ffe3 Mon Sep 17 00:00:00 2001 From: Alan Penner Date: Sun, 26 Jan 2014 20:29:06 -0800 Subject: [PATCH] log ip instead of throw it in exception --- mining/service.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mining/service.py b/mining/service.py index 4f7f4e4..c65cfd2 100644 --- a/mining/service.py +++ b/mining/service.py @@ -118,13 +118,15 @@ class MiningService(GenericService): # Check if worker is authorized to submit shares ip = self.connection_ref()._get_ip() if not Interfaces.worker_manager.authorize(worker_name, session['authorized'].get(worker_name)): - raise SubmitException("Worker is not authorized: IP "+str(ip)) + log.info("Worker is not authorized: IP %s", str(ip)) + raise SubmitException("Worker is not authorized") # Check if extranonce1 is in connection session extranonce1_bin = session.get('extranonce1', None) if not extranonce1_bin: - raise SubmitException("Connection is not subscribed for mining: %s"+str(ip)) + log.info("Connection is not subscribed for mining: IP %s", str(ip)) + raise SubmitException("Connection is not subscribed for mining") # Get current block job_id difficulty = session['difficulty']