Skip to content

Commit

Permalink
Merge pull request #452 from heldertb/master
Browse files Browse the repository at this point in the history
Added some log info and fixed a typo
  • Loading branch information
zone117x committed Feb 22, 2016
2 parents 94ef015 + 9e20064 commit 2d991e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions libs/poolWorker.js
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion libs/shareProcessor.js
Expand Up @@ -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){
Expand Down

0 comments on commit 2d991e4

Please sign in to comment.