Merge pull request #1911 from wpaulino/tor-controller-if-inbound

server: start tor controller if we should listen for inbound connections
This commit is contained in:
Olaoluwa Osuntokun 2018-09-19 20:32:16 -07:00 committed by GitHub
commit 6d759bd8d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}