]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_p2p_Khashmir/db.py
Added the new paper targetting INFOCOM to the docs.
[quix0rs-apt-p2p.git] / apt_p2p_Khashmir / db.py
index a7962566cc5a07eb99c0744b65eb81389f8b45bc..89ac04d844d4818da22a2d67446dfd8d825a44d2 100644 (file)
@@ -103,7 +103,7 @@ class DB:
         c = self.conn.cursor()
         c.execute("DELETE FROM nodes WHERE id NOT NULL")
         for bucket in buckets:
-            for node in bucket.l:
+            for node in bucket.nodes:
                 c.execute("INSERT INTO nodes VALUES (?, ?, ?)", (khash(node.id), node.host, node.port))
         self.conn.commit()
         
@@ -209,11 +209,11 @@ class TestDB(unittest.TestCase):
         dummy2.port = 12345
         class bl:
             def __init__(self):
-                self.l = []
+                self.nodes = []
         bl1 = bl()
-        bl1.l.append(dummy())
+        bl1.nodes.append(dummy())
         bl2 = bl()
-        bl2.l.append(dummy2)
+        bl2.nodes.append(dummy2)
         buckets = [bl1, bl2]
         self.store.dumpRoutingTable(buckets)
         rt = self.store.getRoutingTable()