Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: martok on June 04, 2011, 04:53:29 AM



Title: Two clients giving different getdifficulty values
Post by: martok on June 04, 2011, 04:53:29 AM
Hi,

I have one client getdifficulty reading 434882 and another (git) at 434877. Gribble thinks 434882 is correct but why the divergent readings?


Title: Re: What is current difficulty?
Post by: max in montreal on June 04, 2011, 04:56:21 AM
http://www.alloscomp.com/bitcoin/calculator.php


Title: Re: What is current difficulty?
Post by: max in montreal on June 04, 2011, 04:56:57 AM
434882.72175


Title: Re: What is current difficulty?
Post by: theymos on June 04, 2011, 04:59:54 AM
Those difficulty numbers are never used internally by the network: they are only used as an easy way of expressing the current difficulty. How it is derived from the actual "difficulty" (a very large target number) varies by version.

If two sources give you difficulty numbers within 100 or so, they probably refer to the same difficulty.


Title: Re: Two clients giving different getdifficulty values
Post by: Pieter Wuille on June 04, 2011, 10:11:23 AM
There was a rounding error in the way the old difficulty was calculated, the one calculated by git head is actually more correct.

And indeed, it's only converted to a floating-point number for showing it to the user - internally it's all integers, where nothing was changed.