added RoutedHost and updated new_node to support it

This commit is contained in:
Alex Haynes
2019-04-20 17:35:05 -04:00
parent 367a939087
commit e7424d3673
6 changed files with 85 additions and 15 deletions

View File

@ -15,8 +15,7 @@ class KadPeerInfo(PeerInfo):
def __init__(self, peer_id, peer_data=None):
super(KadPeerInfo, self).__init__(peer_id, peer_data)
# pylint: disable=protected-access
self.peer_id = peer_id._id_str
self.peer_id = peer_id.get_raw_id()
self.long_id = int(digest(peer_id._id_str).hex(), 16)
self.addrs = peer_data.get_addrs() if peer_data else None