From 9e2006489e3f35ca9f2f0e9af806e0af23f5b817 Mon Sep 17 00:00:00 2001 From: Helder De Baere Date: Mon, 22 Feb 2016 14:53:21 +0100 Subject: [PATCH] Added some log info and fixed a typo --- libs/poolWorker.js | 10 +++++++--- libs/shareProcessor.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/poolWorker.js b/libs/poolWorker.js index 9de7ec8..59659e0 100644 --- a/libs/poolWorker.js +++ b/libs/poolWorker.js @@ -184,12 +184,16 @@ module.exports = function(logger){ logger.debug(logSystem, logComponent, logSubCat, 'We thought a block was found but it was rejected by the daemon, share data: ' + shareData); else if (isValidBlock) - logger.debug(logSystem, logComponent, logSubCat, 'Block found: ' + data.blockHash); + logger.debug(logSystem, logComponent, logSubCat, 'Block found: ' + data.blockHash + ' by ' + data.worker); - if (isValidShare) + if (isValidShare) { + if(data.shareDiff > 1000000000) + logger.debug(logSystem, logComponent, logSubCat, 'Share was found with diff higher than 1.000.000.000!'); + else if(data.shareDiff > 1000000) + logger.debug(logSystem, logComponent, logSubCat, 'Share was found with diff higher than 1.000.000!'); logger.debug(logSystem, logComponent, logSubCat, 'Share accepted at diff ' + data.difficulty + '/' + data.shareDiff + ' by ' + data.worker + ' [' + data.ip + ']' ); - else if (!isValidShare) + } else if (!isValidShare) logger.debug(logSystem, logComponent, logSubCat, 'Share rejected: ' + shareData); handlers.share(isValidShare, isValidBlock, data) diff --git a/libs/shareProcessor.js b/libs/shareProcessor.js index 4495a00..4da7f1a 100644 --- a/libs/shareProcessor.js +++ b/libs/shareProcessor.js @@ -36,7 +36,7 @@ module.exports = function(logger, poolConfig){ logger.error(logSystem, logComponent, logSubCat, 'Redis client had an error: ' + JSON.stringify(err)) }); connection.on('end', function(){ - logger.error(logSystem, logComponent, logSubCat, 'Connection to redis database as been ended'); + logger.error(logSystem, logComponent, logSubCat, 'Connection to redis database has been ended'); }); connection.info(function(error, response){