for bad in bads:
assert bad not in self.verified.shares
assert bad in self.heads
+ if p2pool.DEBUG:
+ print "BAD", bad
self.remove(bad)
# try to get at least CHAIN_LENGTH height for each verified head, requesting parents if needed
if p2pool.DEBUG:
- print len(self.verified.tails.get(best_tail, []))
- for h in scores:
+ print len(self.verified.tails.get(best_tail, [])), '\\/\\/\\/\\/\\/'
+ if len(scores) > 10:
+ print ' ...'
+ for h in scores[-10:]:
print ' ', format_hash(h), format_hash(self.verified.shares[h].previous_hash), (
self.verified.get_work(self.verified.get_nth_parent_hash(h, min(5, self.verified.get_height(h)))),
ht.get_min_height(self.verified.shares[h].previous_block),
matching_in_chain = counter(current_work.value['best_share_hash'], height)
shares_in_chain = my_shares & matching_in_chain
stale_shares = my_shares - matching_in_chain
- print 'Pool: %sH/s in %i shares Recent: %.02f%% >%sH/s Shares: %i (%i stale) Peers: %i' % (
+ print 'Pool: %sH/s in %i shares (%i/%i verified) Recent: %.02f%% >%sH/s Shares: %i (%i stale) Peers: %i' % (
math.format(att_s),
height,
+ len(tracker.verified.shares),
+ len(tracker.shares),
weights.get(my_script, 0)/total_weight*100,
math.format(weights.get(my_script, 0)/total_weight*att_s),
len(shares_in_chain) + len(stale_shares),