From fb059ddaa547cbe0fda0a766c2e7b8c99b415885 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Fri, 14 Sep 2018 13:37:18 -0700 Subject: [PATCH] server: start tor controller if we should listen for inbound connections over Tor In this commit, we fix a small bug where we would attempt to start the Tor controller even if we were not requested to automatically create and onion service in order to listen for inbound connections over Tor. --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 35ef3689..525d6d31 100644 --- a/server.go +++ b/server.go @@ -432,7 +432,7 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl, // If we were requested to route connections through Tor and to // automatically create an onion service, we'll initiate our Tor // controller and establish a connection to the Tor server. - if cfg.Tor.Active { + if cfg.Tor.Active && (cfg.Tor.V2 || cfg.Tor.V3) { s.torController = tor.NewController(cfg.Tor.Control) }