2
1
The current value of bits in the block header is: 18034379. In target form, this is equal to:
0x0000000000000000034379000000000000000000000000000000000000000000
However, if you calculate the target using the difficulty:
target = maxtarget / difficulty
target = 0x00000000ffff0000000000000000000000000000000000000000000000000000 / 336899932795.8077
target = 0x0000000000000000034379000000004000000000000000000000000000000000
As you can just about see, this calculated value is more accurate than the truncated target you get using bits.
My question is:
- When mining, is the truncated target used (the one you get from
bits), as opposed to the more accurate target you get by dividing the maxtarget by the difficulty? - Therefore, for all practical purposes, you should truncate the target you get when you divide the maxtarget by the difficulty?
Thanks, as always. So if I were to create my own
bitsfrom thetargetmax/difficultycalculation, should I simply use the first 3 significant bytes as the coefficient part of thebits? If so, should I round up or down? – inersha – 2017-01-18T20:04:22.733