From 5f495379825bb60f7ae03a2a394063a9bedd6585 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Mon, 30 Jan 2012 22:54:15 -0500 Subject: [PATCH] more verbose invalid hash message --- p2pool/bitcoin/p2p.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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) -- 1.7.1