Periodic refresh issue fixed for Python3
This commit is contained in:
parent
464ae5bd1f
commit
080ed21627
@ -73,7 +73,7 @@ class Server(object):
|
||||
for id in self.protocol.getRefreshIDs():
|
||||
node = Node(id)
|
||||
nearest = self.protocol.router.findNeighbors(node, self.alpha)
|
||||
spider = NodeSpiderCrawl(self.protocol, node, nearest)
|
||||
spider = NodeSpiderCrawl(self.protocol, node, nearest, self.ksize, self.alpha)
|
||||
ds.append(spider.find())
|
||||
|
||||
# do our crawling
|
||||
|
@ -22,7 +22,7 @@ class KademliaProtocol(RPCProtocol):
|
||||
"""
|
||||
ids = []
|
||||
for bucket in self.router.getLonelyBuckets():
|
||||
ids.append(random.randint(*bucket.range))
|
||||
ids.append(random.randint(*bucket.range).to_bytes(20, byteorder='big'))
|
||||
return ids
|
||||
|
||||
def rpc_stun(self, sender):
|
||||
|
Loading…
Reference in New Issue
Block a user