diff --git a/config.go b/config.go index c45a11dd..976f659f 100644 --- a/config.go +++ b/config.go @@ -19,10 +19,8 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcutil" flags "github.com/jessevdk/go-flags" - "github.com/lightningnetwork/lnd/brontide" "github.com/lightningnetwork/lnd/htlcswitch/hodl" "github.com/lightningnetwork/lnd/lncfg" "github.com/lightningnetwork/lnd/lnwire" @@ -1030,15 +1028,6 @@ func supportedSubsystems() []string { return subsystems } -// noiseDial is a factory function which creates a connmgr compliant dialing -// function by returning a closure which includes the server's identity key. -func noiseDial(idPriv *btcec.PrivateKey) func(net.Addr) (net.Conn, error) { - return func(a net.Addr) (net.Conn, error) { - lnAddr := a.(*lnwire.NetAddress) - return brontide.Dial(idPriv, lnAddr, cfg.net.Dial) - } -} - func parseRPCParams(cConfig *chainConfig, nodeConfig interface{}, net chainCode, funcName string) error { diff --git a/server.go b/server.go index a86276a3..565f66d6 100644 --- a/server.go +++ b/server.go @@ -207,6 +207,15 @@ func parseAddr(address string) (net.Addr, error) { return cfg.net.ResolveTCPAddr("tcp", hostPort) } +// noiseDial is a factory function which creates a connmgr compliant dialing +// function by returning a closure which includes the server's identity key. +func noiseDial(idPriv *btcec.PrivateKey) func(net.Addr) (net.Conn, error) { + return func(a net.Addr) (net.Conn, error) { + lnAddr := a.(*lnwire.NetAddress) + return brontide.Dial(idPriv, lnAddr, cfg.net.Dial) + } +} + // newServer creates a new instance of the server which is to listen using the // passed listener address. func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl,