Skip to content

Commit

Permalink
instead of 300, request a random length of shares so that it always e…
Browse files Browse the repository at this point in the history
…ventually gets past a too-large chunk of the sharechain
  • Loading branch information
forrestv committed Dec 2, 2012
1 parent 216839e commit f4a7b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2pool/node.py
Expand Up @@ -110,7 +110,7 @@ def download_shares():
try:
shares = yield peer.get_shares(
hashes=[share_hash],
parents=300-1,
parents=random.randrange(500), # randomize parents so that we eventually get past a too large block of shares
stops=list(set(self.node.tracker.heads) | set(
self.node.tracker.get_nth_parent_hash(head, min(max(0, self.node.tracker.get_height_and_last(head)[0] - 1), 10)) for head in self.node.tracker.heads
))[:100],
Expand Down

0 comments on commit f4a7b14

Please sign in to comment.