async def on_connect(self, peer: ws.WSChiaConnection):
    if ((peer.is_outbound is False) and (peer.peer_server_port is not None) and (peer.connection_type is NodeType.FULL_NODE) and (self.server._local_type is NodeType.FULL_NODE) and (self.address_manager is not None)):
        timestamped_peer_info = TimestampedPeerInfo(peer.peer_host, peer.peer_server_port, uint64(int(time.time())))
        (await self.address_manager.add_to_new_table([timestamped_peer_info], peer.get_peer_info(), 0))
        if (self.relay_queue is not None):
            self.relay_queue.put_nowait((timestamped_peer_info, 1))
    if (peer.is_outbound and (peer.peer_server_port is not None) and (peer.connection_type is NodeType.FULL_NODE) and ((self.server._local_type is NodeType.FULL_NODE) or (self.server._local_type is NodeType.WALLET)) and (self.address_manager is not None)):
        msg = make_msg(ProtocolMessageTypes.request_peers, full_node_protocol.RequestPeers())
        (await peer.send_message(msg))
async def on_connect(self, peer: ws.WSChiaConnection):
    if ((peer.is_outbound is False) and (peer.peer_server_port is not None) and (peer.connection_type is NodeType.FULL_NODE) and (self.server._local_type is NodeType.FULL_NODE) and (self.address_manager is not None)):
        timestamped_peer_info = TimestampedPeerInfo(peer.peer_host, peer.peer_server_port, uint64(int(time.time())))
        (await self.address_manager.add_to_new_table([timestamped_peer_info], peer.get_peer_info(), 0))
        if (self.relay_queue is not None):
            self.relay_queue.put_nowait((timestamped_peer_info, 1))
    if (peer.is_outbound and (peer.peer_server_port is not None) and (peer.connection_type is NodeType.FULL_NODE) and ((self.server._local_type is NodeType.FULL_NODE) or (self.server._local_type is NodeType.WALLET)) and (self.address_manager is not None)):
        msg = make_msg(ProtocolMessageTypes.request_peers, full_node_protocol.RequestPeers())
        (await peer.send_message(msg))