From ca6b8896329a1f21c7bb534f026d406b67219898 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Tue, 22 Jun 2021 17:06:21 +1000 Subject: [PATCH] Remove dead code --- swap/src/tor.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/swap/src/tor.rs b/swap/src/tor.rs index 97978b0c..4a6b3e3e 100644 --- a/swap/src/tor.rs +++ b/swap/src/tor.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, bail, Context, Result}; use std::future::Future; -use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4}; +use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use tokio::net::TcpStream; use torut::control::{AsyncEvent, AuthenticatedConn, ConnError, UnauthenticatedConn}; use torut::onion::TorSecretKeyV3; @@ -111,32 +111,6 @@ pub struct AuthenticatedClient { } impl AuthenticatedClient { - /// Add an ephemeral tor service on localhost with the provided key - /// `service_port` and `onion_port` can be different but don't have to as - /// they are on different networks. - pub async fn add_service( - &mut self, - service_port: u16, - onion_port: u16, - tor_key: &TorSecretKeyV3, - ) -> Result<()> { - self.inner - .add_onion_v3( - tor_key, - false, - false, - false, - None, - &mut [( - onion_port, - SocketAddr::new(IpAddr::from(Ipv4Addr::new(127, 0, 0, 1)), service_port), - )] - .iter(), - ) - .await - .map_err(|e| anyhow!("Could not add onion service.: {:#?}", e)) - } - /// Add an ephemeral tor service on localhost with the provided key /// `service_port` and `onion_port` can be different but don't have to as /// they are on different networks.