fixed incomplete removal of new_script
authorForrest Voight <forrest@forre.st>
Mon, 6 Feb 2012 21:59:26 +0000 (16:59 -0500)
committerForrest Voight <forrest@forre.st>
Mon, 6 Feb 2012 22:00:20 +0000 (17:00 -0500)
p2pool/draw.py
p2pool/main.py

index f4cf1ba..9b4094b 100644 (file)
@@ -35,7 +35,7 @@ def perp_and_normalize_to((dx, dy), d):
 
 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:
@@ -52,7 +52,7 @@ def go(share, tracker, t, d):
         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)
index 52a66e2..6365637 100644 (file)
@@ -838,7 +838,7 @@ def main(args, net, datadir_path, merged_urls):
                 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()