def go(share, tracker, t, d):
#c = color.green if share.peer is None else color.red
- c = get_color(share.new_script)
+ c = get_color(share.share_data['new_script'])
pos = get_pos(share, t, d)
pygame.draw.circle(d, c, pos.rounded, 5)
if share.previous_hash in tracker.shares:
pygame.draw.circle(d, c, pos.rounded, 10, 2)
for child_hash in tracker.reverse_shares.get(share.hash, set()):
go(tracker.shares[child_hash], tracker, t, d)
- d.blit(f.render(bitcoin_data.script2_to_human(share.new_script, tracker.net.PARENT), True, (255, 255, 255)), pos)
+ d.blit(f.render(bitcoin_data.script2_to_human(share.share_data['new_script'], tracker.net.PARENT), True, (255, 255, 255)), pos)
pygame.font.init()
f = pygame.font.SysFont("Monospace", 16)
def _new_share(self, share):
if share.pow_hash <= share.header['bits'].target and share.header_hash not in self.announced_hashes:
self.announced_hashes.add(share.header_hash)
- self.say('#p2pool', '\x02BLOCK FOUND by %s! http://blockexplorer.com/block/%064x' % (bitcoin_data.script2_to_address(share.new_script, net.PARENT), share.header_hash))
+ self.say('#p2pool', '\x02BLOCK FOUND by %s! http://blockexplorer.com/block/%064x' % (bitcoin_data.script2_to_address(share.share_data['new_script'], net.PARENT), share.header_hash))
def connectionLost(self, reason):
tracker.verified.added.unwatch(self.watch_id)
print 'IRC connection lost:', reason.getErrorMessage()