git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
8c9f2ca
)
ban peers that send a message with an invalid hash, since continually reconnecting...
author
Forrest Voight
<forrest@forre.st>
Mon, 21 Jan 2013 20:00:18 +0000 (15:00 -0500)
committer
Forrest Voight
<forrest@forre.st>
Mon, 21 Jan 2013 20:00:18 +0000 (15:00 -0500)
p2pool/util/p2protocol.py
patch
|
blob
|
history
diff --git
a/p2pool/util/p2protocol.py
b/p2pool/util/p2protocol.py
index
2ca3139
..
e1ba80c
100644
(file)
--- a/
p2pool/util/p2protocol.py
+++ b/
p2pool/util/p2protocol.py
@@
-54,7
+54,7
@@
class Protocol(protocol.Protocol):
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')
- self.transport.loseConnection()
+ self.badPeerHappened()
continue
type_ = getattr(self, 'message_' + command, None)