Skip to content

Commit

Permalink
fixed share version check to actually check for majority instead of p…
Browse files Browse the repository at this point in the history
…lurality
  • Loading branch information
forrestv committed May 2, 2012
1 parent d04f1aa commit 5cbe41a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2pool/main.py
Expand Up @@ -811,7 +811,7 @@ def status_thread():

desired_version_counts = p2pool_data.get_desired_version_counts(tracker, current_work.value['best_share_hash'], min(720, height))
majority_desired_version = max(desired_version_counts, key=lambda k: desired_version_counts[k])
if majority_desired_version not in [0, 1]:
if majority_desired_version not in [0, 1] and desired_version_counts[majority_desired_version] > sum(desired_version_counts.itervalues())/2:
print >>sys.stderr, '#'*40
print >>sys.stderr, '>>> WARNING: A MAJORITY OF SHARES CONTAIN A VOTE FOR AN UNSUPPORTED SHARE IMPLEMENTATION! (v%i with %i%% support)' % (
majority_desired_version, 100*desired_version_counts[majority_desired_version]/sum(desired_version_counts.itervalues()))
Expand Down

0 comments on commit 5cbe41a

Please sign in to comment.