mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
fix all tests
This commit is contained in:
@ -151,11 +151,7 @@ class RoutingTable:
|
||||
self.buckets[index].remove_node(node)
|
||||
|
||||
def is_new_node(self, node):
|
||||
print ("IN IS NEW NODE")
|
||||
print (node)
|
||||
print (self.buckets)
|
||||
index = self.get_bucket_for(node)
|
||||
print (index)
|
||||
return self.buckets[index].is_new_node(node)
|
||||
|
||||
def add_contact(self, node):
|
||||
@ -178,15 +174,7 @@ class RoutingTable:
|
||||
"""
|
||||
Get the index of the bucket that the given node would fall into.
|
||||
"""
|
||||
print ("IN GET BUKCKET FOR")
|
||||
print (node)
|
||||
print (node.long_id)
|
||||
print (self.buckets)
|
||||
for index, bucket in enumerate(self.buckets):
|
||||
print ("IN ENUMERATE")
|
||||
print (index)
|
||||
print (bucket)
|
||||
print (bucket.range)
|
||||
if node.long_id < bucket.range[1]:
|
||||
return index
|
||||
# we should never be here, but make linter happy
|
||||
|
||||
Reference in New Issue
Block a user