forked from LBRYCommunity/lbry-sdk
remove unused distance function from routingtable
This commit is contained in:
parent
323bccb0ae
commit
250831a86a
1 changed files with 0 additions and 10 deletions
|
@ -31,16 +31,6 @@ class RoutingTable(object):
|
||||||
@type contact: kademlia.contact.Contact
|
@type contact: kademlia.contact.Contact
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def distance(self, keyOne, keyTwo):
|
|
||||||
""" Calculate the XOR result between two string variables
|
|
||||||
|
|
||||||
@return: XOR result of two long variables
|
|
||||||
@rtype: long
|
|
||||||
"""
|
|
||||||
valKeyOne = long(keyOne.encode('hex'), 16)
|
|
||||||
valKeyTwo = long(keyTwo.encode('hex'), 16)
|
|
||||||
return valKeyOne ^ valKeyTwo
|
|
||||||
|
|
||||||
def findCloseNodes(self, key, count, _rpcNodeID=None):
|
def findCloseNodes(self, key, count, _rpcNodeID=None):
|
||||||
""" Finds a number of known nodes closest to the node/value with the
|
""" Finds a number of known nodes closest to the node/value with the
|
||||||
specified key.
|
specified key.
|
||||||
|
|
Loading…
Add table
Reference in a new issue