From: Forrest Voight Date: Thu, 27 Jun 2013 17:02:25 +0000 (-0400) Subject: fixed 5cde217 causing assertion failures in debug mode X-Git-Tag: 13.0~16 X-Git-Url: https://git.novaco.in/?p=p2pool.git;a=commitdiff_plain;h=ad706b81ec0d8d8f863851ae5a109cb578dc1529 fixed 5cde217 causing assertion failures in debug mode --- diff --git a/p2pool/util/pack.py b/p2pool/util/pack.py index 1ed2629..b2fd6da 100644 --- a/p2pool/util/pack.py +++ b/p2pool/util/pack.py @@ -63,7 +63,9 @@ class Type(object): obj = self._unpack(data, ignore_trailing) if p2pool.DEBUG: - if self._pack(obj) != data: + packed = self._pack(obj) + good = data.startswith(packed) if ignore_trailing else data == packed + if not good: raise AssertionError() return obj