forknote / forknote-pool

Mining pool for Bytecoin/Forknote based coins such as Bytecoin and Dashcoin.
https://github.com/forknote/forknote-pool
GNU General Public License v2.0
123 stars 185 forks source link

Better readable network difficulty + correct readable hash rate calculation #43

Open Anton-Beresansky opened 6 years ago

Anton-Beresansky commented 6 years ago

When difficulty is 1598298868 (for example) it's not readable. 1.60 G is much better to read. The denomination of hash rates follows the International System of Units (SI) https://bitcoin.stackexchange.com/a/21498

Anton-Beresansky commented 6 years ago

Sorry for errors. Now it's must be correct. Tested on my own pool.

DiscoTim commented 6 years ago

Are you sure this is correct? Doesn't it still need to be represented with the H, eg. GH. If that is true, it could just use getReadableHashRateString instead of the new function. I could be wrong :D

Its great the extra units are added and the K-k is corrected though :)

Anton-Beresansky commented 6 years ago

It was the first thing I did - started to use getReadableHashRateString for difficulty. Then I've made some research and find out that difficulty should be without H, so I created a separate function.