multi: Added a NetInterface to clean up config.go
This commit adds a new interface named NetInterface and two implementations of it: RegularNet & TorProxyNet. These two structs are used in config.go in an attempt to clean up the code and abstract away the dialer and DNS functions.
This commit is contained in:
1 parent
e132ad8433
commit
8c482f2be7
6 files changed
+99
-87
No files matched your search
+1
-1
@@ -590,7 +590,7 @@ func (r *rpcServer) ConnectPeer(ctx context.Context,
|
||||
}
|
||||
|
||||
// We use lndResolveTCP here in case we wish to resolve hosts over Tor.
|
||||
host, err := lndResolveTCP("tcp", addr)
|
||||
host, err := cfg.net.ResolveTCPAddr("tcp", addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user