From: Forrest Voight Date: Tue, 31 Jan 2012 03:54:15 +0000 (-0500) Subject: more verbose invalid hash message X-Git-Tag: 0.8.3~24 X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=5f495379825bb60f7ae03a2a394063a9bedd6585;p=p2pool.git more verbose invalid hash message --- diff --git a/p2pool/bitcoin/p2p.py b/p2pool/bitcoin/p2p.py index 09a80f1..3cbe645 100644 --- a/p2pool/bitcoin/p2p.py +++ b/p2pool/bitcoin/p2p.py @@ -45,7 +45,7 @@ class BaseProtocol(protocol.Protocol): if checksum is not None: if hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4] != checksum: - print 'invalid hash for', repr(command), checksum.encode('hex') if checksum is not None else None, repr(payload[:100].encode('hex')), len(payload) + print 'invalid hash for', self.transport.getPeer().host, repr(command), length, checksum.encode('hex'), hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4].encode('hex'), payload.encode('hex') continue type_ = getattr(self, 'message_' + command, None)