Closed kaykurokawa closed 6 years ago
Lbrycrd's maximum target is 0x0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff or in nBits 0x1f00ffff, compared to Bitcoin's maximum nBits 0x1d00ffff
Why?
And if so, isn't there an off by one introduced? (comparison is < 32 and should be < 31, no?)
oops, dumb mistake yes should be < 31
I believe the maximum target got lowered since our mining algorithm is harder than Bitcoin's and it took too long to generate blocks initially (genesis target is set to maximum target)
I believe the maximum target got lowered since our mining algorithm is harder than Bitcoin's and it took too long to generate blocks initially (genesis target is set to maximum target)
:+1:
Fixed
Lbrycrd's maximum target is 0x0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff or in nBits 0x1f00ffff, compared to Bitcoin's maximum nBits 0x1d00ffff
We never adjusted the GetDifficulty() function to reflect this change (29 == 0x1d , 32==0x1f). This change makes it so that the lowest difficulty we can have is 1 , instead of some decimal number.
I'm not aware of any applications that uses this difficulty readings from RPC commands so its probably ok to change this.
See https://en.bitcoin.it/wiki/Difficulty for more info.