Give 1% variance in shares to account for javascript precision loss

This commit is contained in:
Matt 2014-05-09 10:01:59 -06:00
parent dc17481db6
commit e9e7756242
1 changed files with 2 additions and 2 deletions

View File

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