Skip to content

Commit

Permalink
Add minimum pseudoshare_target diff to avoid HWs from DIFF 0 work
Browse files Browse the repository at this point in the history
Patch from @roy7 to eliminate hardware errors when miners join an empty
node.
  • Loading branch information
CartmanSPC authored and CartmanSPC committed Mar 1, 2014
1 parent 30b9277 commit 17ac31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2pool/work.py
Expand Up @@ -297,7 +297,7 @@ def get_work(self, pubkey_hash, desired_share_target, desired_pseudoshare_target
mm_later = [(dict(aux_work, target=aux_work['target'] if aux_work['target'] != 'p2pool' else share_info['bits'].target), index, hashes) for aux_work, index, hashes in mm_later]

if desired_pseudoshare_target is None:
target = 2**256-1
target = bitcoin_data.difficulty_to_target(float(1.0 / self.node.net.PARENT.DUMB_SCRYPT_DIFF))
local_hash_rate = self._estimate_local_hash_rate()
if local_hash_rate is not None:
target = min(target,
Expand Down

0 comments on commit 17ac31a

Please sign in to comment.