Update routing.py

This commit is contained in:
呆萌的弛哥SkyZH在银光闪烁的沙滩上面对大海写代码 2015-10-16 23:49:54 +08:00
parent a9e390126c
commit ac7b3c12ab

View File

@ -25,7 +25,7 @@ class KBucket(object):
one = KBucket(self.range[0], midpoint, self.ksize)
two = KBucket(midpoint + 1, self.range[1], self.ksize)
for node in self.nodes.values():
bucket = one if node.id <= midpoint else two
bucket = one if node.long_id <= midpoint else two
bucket.nodes[node.id] = node
return (one, two)