incremented version to 10
[p2pool.git] / p2pool / p2p.py
index b8a0995..57c56bf 100644 (file)
@@ -45,7 +45,7 @@ class Protocol(p2protocol.Protocol):
         self.addr = self.transport.getPeer().host, self.transport.getPeer().port
         
         self.send_version(
-            version=8,
+            version=1000,
             services=0,
             addr_to=dict(
                 services=0,
@@ -257,7 +257,7 @@ class Protocol(p2protocol.Protocol):
         ('shares', pack.ListType(p2pool_data.share_type)),
     ])
     def handle_shares(self, shares):
-        self.node.handle_shares([p2pool_data.load_share(share, self.node.net, self) for share in shares if share['type'] == 9], self)
+        self.node.handle_shares([p2pool_data.load_share(share, self.node.net, self) for share in shares if share['type'] >= 9], self)
     
     def sendShares(self, shares, tracker, known_txs, include_txs_with=[]):
         if not shares:
@@ -310,7 +310,7 @@ class Protocol(p2protocol.Protocol):
     ])
     def handle_sharereply(self, id, result, shares):
         if result == 'good':
-            res = [p2pool_data.load_share(share, self.node.net, self) for share in shares if share['type'] not in [6, 7]]
+            res = [p2pool_data.load_share(share, self.node.net, self) for share in shares if share['type'] >= 9]
         else:
             res = failure.Failure("sharereply result: " + result)
         self.get_shares.got_response(id, res)
@@ -356,10 +356,10 @@ class Protocol(p2protocol.Protocol):
                 for cache in self.known_txs_cache.itervalues():
                     if tx_hash in cache:
                         tx = cache[tx_hash]
-                        print 'Transaction rescued from peer latency cache!'
+                        print 'Transaction %064x rescued from peer latency cache!' % (tx_hash,)
                         break
                 else:
-                    print >>sys.stderr, 'Peer referenced unknown transaction, disconnecting'
+                    print >>sys.stderr, 'Peer referenced unknown transaction %064x, disconnecting' % (tx_hash,)
                     self.transport.loseConnection()
                     return
             
@@ -375,7 +375,7 @@ class Protocol(p2protocol.Protocol):
                 return
             
             if tx_hash in self.node.known_txs_var.value and not warned:
-                print 'Peer sent entire transaction that was already received'
+                print 'Peer sent entire transaction %064x that was already received' % (tx_hash,)
                 warned = True
             
             self.remembered_txs[tx_hash] = tx