forked from LBRYCommunity/lbry-sdk
we dont always want to encode key here. bucket.keyInRange() already does it when necessary
This commit is contained in:
parent
bee67117c8
commit
99e4f9b00b
1 changed files with 1 additions and 2 deletions
|
@ -308,10 +308,9 @@ class TreeRoutingTable(RoutingTable):
|
|||
@return: The index of the k-bucket responsible for the specified key
|
||||
@rtype: int
|
||||
"""
|
||||
valKey = long(key.encode('hex'), 16)
|
||||
i = 0
|
||||
for bucket in self._buckets:
|
||||
if bucket.keyInRange(valKey):
|
||||
if bucket.keyInRange(key):
|
||||
return i
|
||||
else:
|
||||
i += 1
|
||||
|
|
Loading…
Add table
Reference in a new issue