more fixes
authorForrest Voight <forrest@forre.st>
Sat, 26 Nov 2011 07:11:51 +0000 (02:11 -0500)
committerForrest Voight <forrest@forre.st>
Sat, 26 Nov 2011 07:11:51 +0000 (02:11 -0500)
p2pool/data.py

index 1810398..e62efba 100644 (file)
@@ -247,12 +247,12 @@ class NewShare(Share):
     @classmethod
     def from_share(cls, share, net):
         if share['type'] == 0:
-            res = self.from_share1a(new_share1a_type.unpack(share['contents']), net)
+            res = cls.from_share1a(new_share1a_type.unpack(share['contents']), net)
             if not (res.pow_hash > res.header['target']):
                 raise ValueError('invalid share type')
             return res
         elif share['type'] == 1:
-            res = self.from_share1b(new_share1b_type.unpack(share['contents']), net)
+            res = cls.from_share1b(new_share1b_type.unpack(share['contents']), net)
             if not (res.pow_hash <= res.header['target']):
                 raise ValueError('invalid share type')
             return res