Fixed bug in last commit

This commit is contained in:
Matt 2014-05-09 10:07:23 -06:00
parent e9e7756242
commit de1c8c018b
1 changed files with 2 additions and 3 deletions

View File

@ -235,9 +235,8 @@ var JobManager = module.exports = function JobManager(options){
if (options.emitInvalidBlockHashes)
blockHashInvalid = util.reverseBuffer(util.sha256d(headerBuffer)).toString('hex');
//Check if share didn't reached the miner's difficulty)
if (shareDiff / difficulty > 0.99){
if (shareDiff / difficulty < 0.99){
//Check if share matched a previous difficulty from before a vardiff retarget
if (previousDifficulty && shareDiff >= previousDifficulty){
@ -258,7 +257,7 @@ var JobManager = module.exports = function JobManager(options){
height: job.rpcData.height,
blockReward: job.rpcData.coinbasevalue,
difficulty: difficulty,
shareDiff: shareDiff,
shareDiff: shareDiff.toFixed(8),
blockDiff : blockDiffAdjusted,
blockDiffActual: job.difficulty,
blockHash: blockHash,