Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
borzunov authored and justheuristic committed Jun 7, 2022
1 parent 4f2a893 commit 1bcc4a3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions hivemind/p2p/p2p_daemon_bindings/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ def from_protobuf(cls, peer_info_pb: p2pd_pb2.PeerInfo) -> "PeerInfo":
addrs = [Multiaddr(addr) for addr in peer_info_pb.addrs]
return PeerInfo(peer_id, addrs)

@classmethod
def from_tuple(cls, value: Tuple[str, Sequence[str]]) -> "PeerInfo":
peer_id = PeerID.from_base58(value[0])
addrs = [Multiaddr(addr) for addr in value[1]]
return PeerInfo(peer_id, addrs)

def __str__(self):
return f"{self.peer_id.pretty()} {','.join(str(a) for a in self.addrs)}"

Expand Down

0 comments on commit 1bcc4a3

Please sign in to comment.