Refactor ID to take in type bytes only

This commit is contained in:
NIC619
2019-07-31 19:26:13 +08:00
parent f6e456c96e
commit 80481252ca
6 changed files with 56 additions and 58 deletions

View File

@ -22,7 +22,7 @@ class KadmeliaPeerRouter(IPeerRouting):
:return: KadPeerInfo of specified peer
"""
# switching peer_id to xor_id used by kademlia as node_id
xor_id = peer_id.get_xor_id()
xor_id = peer_id.xor_id
value = await self.server.get(xor_id)
return decode_peerinfo(value)