async def _add_peer(self, host: str, port: int, node_id: bytes) -> Peer:
    if (node_id in self._peers):
        return self._peers[node_id]
    port = int(port)
    peer_addr = LNPeerAddr(host, port, node_id)
    self._trying_addr_now(peer_addr)
    self.logger.info(f'adding peer {peer_addr}')
    if (node_id == self.node_keypair.pubkey):
        raise ErrorAddingPeer('cannot connect to self')
    transport = LNTransport(self.node_keypair.privkey, peer_addr, proxy=self.network.proxy)
    peer = (await self._add_peer_from_transport(node_id=node_id, transport=transport))
    return peer
async def _add_peer(self, host: str, port: int, node_id: bytes) -> Peer:
    if (node_id in self._peers):
        return self._peers[node_id]
    port = int(port)
    peer_addr = LNPeerAddr(host, port, node_id)
    self._trying_addr_now(peer_addr)
    self.logger.info(f'adding peer {peer_addr}')
    if (node_id == self.node_keypair.pubkey):
        raise ErrorAddingPeer('cannot connect to self')
    transport = LNTransport(self.node_keypair.privkey, peer_addr, proxy=self.network.proxy)
    peer = (await self._add_peer_from_transport(node_id=node_id, transport=transport))
    return peer