fix: this wasnt the right place
authorThomasV <thomasv@gitorious>
Mon, 19 Nov 2012 17:12:05 +0000 (21:12 +0400)
committerThomasV <thomasv@gitorious>
Mon, 19 Nov 2012 17:12:05 +0000 (21:12 +0400)
backends/bitcoind/util.py

index ec03b16..f9b9ddc 100644 (file)
@@ -83,7 +83,6 @@ def hash_160(public_key):
 
 
 def public_key_to_bc_address(public_key):
-    if public_key == 'None': return 'None'
     h160 = hash_160(public_key)
     return hash_160_to_bc_address(h160)
 
@@ -95,6 +94,7 @@ def hash_160_to_bc_address(h160):
     return b58encode(addr)
 
 def bc_address_to_hash_160(addr):
+    if addr == 'None': return 'None'
     bytes = b58decode(addr, 25)
     return bytes[1:21]