simplified assertion in pack since pack/unpack are now bijections
authorForrest Voight <forrest.voight@gmail.com>
Fri, 9 Mar 2012 04:07:23 +0000 (23:07 -0500)
committerForrest Voight <forrest.voight@gmail.com>
Fri, 9 Mar 2012 04:07:23 +0000 (23:07 -0500)
p2pool/util/pack.py

index 5a6cf6f..c2d0ca1 100644 (file)
@@ -62,9 +62,7 @@ class Type(object):
         obj = self._unpack(data)
         
         if p2pool.DEBUG:
-            data2 = self._pack(obj)
-            if data2 != data:
-                if self._unpack(data2) != obj:
+            if self._pack(obj) != data:
                     raise AssertionError()
         
         return obj