]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_dht_Khashmir/ktable.py
Use compact encoding of node contact info in the DHT.
[quix0rs-apt-p2p.git] / apt_dht_Khashmir / ktable.py
index f3001a5869ed5b36bb5fa3bf999ee67f823ca1dd..907263edd9664c005860501d33390261c6b6bb34 100644 (file)
@@ -211,11 +211,11 @@ class KBucket:
 
 class TestKTable(unittest.TestCase):
     def setUp(self):
-        self.a = Node(khash.newID(), 'localhost', 2002)
+        self.a = Node(khash.newID(), '127.0.0.1', 2002)
         self.t = KTable(self.a, {'HASH_LENGTH': 160, 'K': 8, 'MAX_FAILURES': 3})
 
     def testAddNode(self):
-        self.b = Node(khash.newID(), 'localhost', 2003)
+        self.b = Node(khash.newID(), '127.0.0.1', 2003)
         self.t.insertNode(self.b)
         self.failUnlessEqual(len(self.t.buckets[0].l), 1)
         self.failUnlessEqual(self.t.buckets[0].l[0], self.b)