refuse to connect to old nodes for bitcoin network
authorForrest Voight <forrest@forre.st>
Wed, 17 Jul 2013 21:39:23 +0000 (17:39 -0400)
committerForrest Voight <forrest@forre.st>
Thu, 18 Jul 2013 21:34:00 +0000 (17:34 -0400)
p2pool/p2p.py

index d116e40..ea51b4a 100644 (file)
@@ -116,7 +116,7 @@ class Protocol(p2protocol.Protocol):
     def handle_version(self, version, services, addr_to, addr_from, nonce, sub_version, mode, best_share_hash):
         if self.other_version is not None:
             raise PeerMisbehavingError('more than one version message')
-        if version < 8:
+        if version < (13 if self.node.net.NAME == 'bitcoin' else 8):
             raise PeerMisbehavingError('peer too old')
         
         self.other_version = version