bugs
authorforrest <forrest@470744a7-cac9-478e-843e-5ec1b25c69e8>
Wed, 15 Jun 2011 19:25:58 +0000 (19:25 +0000)
committerforrest <forrest@470744a7-cac9-478e-843e-5ec1b25c69e8>
Wed, 15 Jun 2011 19:25:58 +0000 (19:25 +0000)
git-svn-id: svn://forre.st/p2pool@1286 470744a7-cac9-478e-843e-5ec1b25c69e8

bitcoin_p2p.py
p2p.py

index 776895f..6c573d6 100644 (file)
@@ -489,7 +489,7 @@ class Protocol(BaseProtocol):
     def handle_inv(self, invs):
         for inv in invs:
             #print "INV", item['type'], hex(item['hash'])
-            self.send_getdata(invs=[inv])
+            self.send_getdata(requests=[inv])
     
     def handle_addr(self, addrs):
         for addr in addrs:
@@ -516,9 +516,9 @@ class Protocol(BaseProtocol):
 class ProtocolInv(Protocol):
     inv = None
     
-    def handle_getdata(self, invs):
+    def handle_getdata(self, requests):
         if self.inv is None: self.inv = {}
-        for inv in invs:
+        for inv in requests:
             type_, hash_ = inv['type'], inv['hash']
             if (type_, hash_) in self.inv:
                 print "bitcoind requested %s %x, sent" % (type_, hash_)
diff --git a/p2p.py b/p2p.py
index 4aa2885..80636f2 100644 (file)
--- a/p2p.py
+++ b/p2p.py
@@ -189,7 +189,7 @@ class Protocol(bitcoin_p2p.BaseProtocol):
         self.other_mode_var = util.Variable(mode)
         
         if nonce == self.node.nonce:
-            print "Detected connection to self, disconnecting"
+            #print "Detected connection to self, disconnecting"
             self.transport.loseConnection()
             return