improved exception handling in get_payout_script_from_username
authorForrest Voight <forrest@forre.st>
Sat, 24 Dec 2011 07:08:54 +0000 (02:08 -0500)
committerForrest Voight <forrest@forre.st>
Sat, 24 Dec 2011 08:23:43 +0000 (03:23 -0500)
p2pool/main.py

index 8bf7c8a..74a7c96 100644 (file)
@@ -425,9 +425,10 @@ def main(args, net, datadir_path):
             if user is None:
                 return None
             try:
-                return bitcoin_data.pubkey_hash_to_script2(bitcoin_data.address_to_pubkey_hash(user, net.PARENT))
+                pubkey_hash = bitcoin_data.address_to_pubkey_hash(user, net.PARENT)
             except: # XXX blah
                 return None
+            return bitcoin_data.pubkey_hash_to_script2(pubkey_hash)
         
         def compute(user):
             state = current_work.value