Skip to content

Commit

Permalink
Merge pull request p2pool#119 from Rav3nPL/patch-2
Browse files Browse the repository at this point in the history
less spam when 'invalid hash for'
  • Loading branch information
forrestv committed Jul 19, 2013
2 parents 9e33b62 + e487ae9 commit a7e0819
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion p2pool/util/p2protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def dataReceiver(self):
payload = yield length

if hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4] != checksum:
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')
print 'invalid hash for', self.transport.getPeer().host, repr(command), length, checksum.encode('hex')
if p2pool.DEBUG:
print hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4].encode('hex'), payload.encode('hex')
self.badPeerHappened()
continue

Expand Down

0 comments on commit a7e0819

Please sign in to comment.