Post
Topic
Board Mining software (miners)
Re: python OpenCL bitcoin miner
by
LehmanSister
on 20/07/2011, 04:00:44 UTC
Latest poclbm mainline breaks with the new difficulty!

Bugfix: http://gitorious.org/~Luke-Jr/bitcoin/luke-jrs-poclbm/commit/7fdc508a1070f5540046f2d7649eed15503177ad
To merge:
Code:
git fetch https://git.gitorious.org/~Luke-Jr/bitcoin/luke-jrs-poclbm.git bugfix_difficulty_error && git merge FETCH_HEAD

If this saves you time and money, consider dropping me some bitcoin Smiley 1AgqndFUg2sDSxW8NbzPyHvUibW6FHqQeA

Once again, Luke Jr. saves the day.

Here's the patch for the actually curious:
Code:
--- a/Transport.py
+++ b/Transport.py
@@ -62,7 +62,7 @@ class Transport(object):

        def set_difficulty(self, difficulty):
                self.difficulty = difficulty
-               bits = '%08x' % (difficulty,)
+               bits = hex(difficulty)
                bits = bits[2:len(bits) - 1]
                bits = ''.join(list(chunks(bits, 2))[::-1])
                true_target = hex(int(bits[2:], 16) * 2 ** (8 * (int(bits[:2], 16) - 3)))