added hack so that openssl support in python isn't necessary to use new graphs
authorForrest Voight <forrest@forre.st>
Mon, 23 Apr 2012 04:45:48 +0000 (00:45 -0400)
committerForrest Voight <forrest@forre.st>
Mon, 23 Apr 2012 04:45:48 +0000 (00:45 -0400)
p2pool/bitcoin/data.py

index 8ec40de..b2f6756 100644 (file)
@@ -9,6 +9,8 @@ def hash256(data):
     return pack.IntType(256).unpack(hashlib.sha256(hashlib.sha256(data).digest()).digest())
 
 def hash160(data):
+    if data == '04ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664b'.decode('hex'):
+        return 0x384f570ccc88ac2e7e00b026d1690a3fca63dd0 # hack for people who don't have openssl - this is the only value that p2pool ever hashes
     return pack.IntType(160).unpack(hashlib.new('ripemd160', hashlib.sha256(data).digest()).digest())
 
 class ChecksummedType(pack.Type):