def on_peer_successfully_established(self, peer: Peer) -> None:
    if isinstance(peer.transport, LNTransport):
        peer_addr = peer.transport.peer_addr
        self._on_connection_successfully_established(peer_addr)
        if self.channel_db:
            self.channel_db.add_recent_peer(peer_addr)
        for chan in peer.channels.values():
            chan.add_or_update_peer_addr(peer_addr)
def on_peer_successfully_established(self, peer: Peer) -> None:
    if isinstance(peer.transport, LNTransport):
        peer_addr = peer.transport.peer_addr
        self._on_connection_successfully_established(peer_addr)
        if self.channel_db:
            self.channel_db.add_recent_peer(peer_addr)
        for chan in peer.channels.values():
            chan.add_or_update_peer_addr(peer_addr)