mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-30 08:51:27 +00:00
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
|
@return: The index of the k-bucket responsible for the specified key
|
||||||
@rtype: int
|
@rtype: int
|
||||||
"""
|
"""
|
||||||
valKey = long(key.encode('hex'), 16)
|
|
||||||
i = 0
|
i = 0
|
||||||
for bucket in self._buckets:
|
for bucket in self._buckets:
|
||||||
if bucket.keyInRange(valKey):
|
if bucket.keyInRange(key):
|
||||||
return i
|
return i
|
||||||
else:
|
else:
|
||||||
i += 1
|
i += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue