From 0b1ac1a914065d60bf3a874a7dc00ec66a5d4c87 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Wed, 7 Mar 2012 00:22:58 -0500 Subject: [PATCH] choose chain with maximum work instead of height when ranking chain tails --- p2pool/data.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/p2pool/data.py b/p2pool/data.py index f323889..76e7c53 100644 --- a/p2pool/data.py +++ b/p2pool/data.py @@ -352,7 +352,7 @@ class OkayTracker(forest.Tracker): )) # decide best tree - decorated_tails = sorted((self.score(max(self.verified.tails[tail_hash], key=self.verified.get_height), block_rel_height_func), tail_hash) for tail_hash in self.verified.tails) # XXX using get_height here is quite possibly incorrect and vulnerable + decorated_tails = sorted((self.score(max(self.verified.tails[tail_hash], key=self.verified.get_work), block_rel_height_func), tail_hash) for tail_hash in self.verified.tails) if p2pool.DEBUG: print len(decorated_tails), 'tails:' for score, tail_hash in decorated_tails: -- 1.7.1