From d7a584f48f7b96421e133d9347ffa25d686120d3 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 1 Apr 2014 12:50:29 -0400 Subject: [PATCH] some cleanup --- Tunnel.cpp | 44 -------------------------------------------- Tunnel.h | 5 ----- 2 files changed, 49 deletions(-) diff --git a/Tunnel.cpp b/Tunnel.cpp index ea81b1f7..7178e5fd 100644 --- a/Tunnel.cpp +++ b/Tunnel.cpp @@ -535,49 +535,5 @@ namespace tunnel &i2p::context.GetRouterInfo () })); } - - OutboundTunnel * Tunnels::CreateOneHopOutboundTestTunnel (InboundTunnel * replyTunnel) - { - return CreateTunnel (replyTunnel->GetTunnelConfig ()->Invert ()); - } - - InboundTunnel * Tunnels::CreateOneHopInboundTestTunnel (OutboundTunnel * outboundTunnel) - { - i2p::ntcp::NTCPSession * peer = i2p::transports.GetNextNTCPSession (); - if (peer) - { - const i2p::data::RouterInfo& router = peer->GetRemoteRouterInfo (); - return CreateTunnel ( - new TunnelConfig (std::vector{&router}), - outboundTunnel); - } - else - LogPrint ("No established peers"); - return 0; - } - - OutboundTunnel * Tunnels::CreateTwoHopsOutboundTestTunnel (InboundTunnel * replyTunnel) - { - return CreateTunnel (replyTunnel->GetTunnelConfig ()->Invert ()); - } - - InboundTunnel * Tunnels::CreateTwoHopsInboundTestTunnel (OutboundTunnel * outboundTunnel) - { - i2p::ntcp::NTCPSession * peer = i2p::transports.GetNextNTCPSession (); - if (peer) - { - const i2p::data::RouterInfo& router = peer->GetRemoteRouterInfo (); - return CreateTunnel ( - new TunnelConfig (std::vector - { - &router, - &i2p::context.GetRouterInfo () - }), - outboundTunnel); - } - else - LogPrint ("No established peers"); - return 0; - } } } diff --git a/Tunnel.h b/Tunnel.h index 58fd3880..b964c55e 100644 --- a/Tunnel.h +++ b/Tunnel.h @@ -125,11 +125,6 @@ namespace tunnel TunnelPool * CreateTunnelPool (i2p::data::LocalDestination * localDestination); void DeleteTunnelPool (TunnelPool * pool); - OutboundTunnel * CreateOneHopOutboundTestTunnel (InboundTunnel * replyTunnel); - InboundTunnel * CreateOneHopInboundTestTunnel (OutboundTunnel * outboundTunnel = 0); - OutboundTunnel * CreateTwoHopsOutboundTestTunnel (InboundTunnel * replyTunnel); - InboundTunnel * CreateTwoHopsInboundTestTunnel (OutboundTunnel * outboundTunnel = 0); - private: void Run ();