You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, when the pool cannot find a block for some time, i.e. when the Shares/Diff percentage is obviously more than 100%, I do not get the correct value like for example 123%, but the API displays negative numbers instead! Like -93%, -37%, etc.
Any idea why, anyone?
Thank you very much, that was what I needed. I also removed the "100 - " in the case where the luck is positive, so that I now always see the shares/diff*100 as a % value there. It clearly represents the actual work done for the specific block.
Activity
leisegang commentedon Jan 31, 2018
you want it to write 137% instead of -37%.
What would be more "logical" for me as well since there has been hashed 37% more than current difficulty
leisegang commentedon Jan 31, 2018
edit the pool_blocks.html and edit it to this:
else { var accurateShares = shares; } if (difficulty > accurateShares){ var percent = 100 - Math.round(accurateShares / difficulty * 100); return '<span class="luckGood">' + percent + '%</span>'; } else{ var percent = (Math.round(accurateShares / difficulty * 100)) * 1; return '<span class="luckBad">' + percent + '%</span>'; }roshljo commentedon Jan 31, 2018
Thank you very much, that was what I needed. I also removed the "100 - " in the case where the luck is positive, so that I now always see the shares/diff*100 as a % value there. It clearly represents the actual work done for the specific block.
leisegang commentedon Feb 1, 2018
Please paste your updated code so other too can use it. I just did a quick and dirty update. Please share yours.
roshljo commentedon Feb 27, 2018
I use the following:
else { var accurateShares = shares; } if (difficulty > accurateShares){ var percent = Math.round(accurateShares / difficulty * 100);
return '' + percent + '%'; }
else{ var percent = (Math.round(accurateShares / difficulty * 100)) * 1; return '' + percent + '%'; }
This way the value shown is always shares/difficulty, no matter if it is 1% or 500%, only the colour changes from green to red when it is over 100%