From 99e4f9b00b3f207b681f9e02afa90127c3c9de0b Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 4 Apr 2017 15:00:33 -0400 Subject: [PATCH] we dont always want to encode key here. bucket.keyInRange() already does it when necessary --- lbrynet/dht/routingtable.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lbrynet/dht/routingtable.py b/lbrynet/dht/routingtable.py index a4702e7a1..3aa493119 100644 --- a/lbrynet/dht/routingtable.py +++ b/lbrynet/dht/routingtable.py @@ -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