diff --git a/lntest/harness_node.go b/lntest/harness_node.go index fe08f4f0e..7eefaa034 100644 --- a/lntest/harness_node.go +++ b/lntest/harness_node.go @@ -140,15 +140,15 @@ type NodeConfig struct { } func (cfg NodeConfig) P2PAddr() string { - return fmt.Sprintf(listenerFormat, cfg.P2PPort) + return fmt.Sprintf(ListenerFormat, cfg.P2PPort) } func (cfg NodeConfig) RPCAddr() string { - return fmt.Sprintf(listenerFormat, cfg.RPCPort) + return fmt.Sprintf(ListenerFormat, cfg.RPCPort) } func (cfg NodeConfig) RESTAddr() string { - return fmt.Sprintf(listenerFormat, cfg.RESTPort) + return fmt.Sprintf(ListenerFormat, cfg.RESTPort) } // DBDir returns the holding directory path of the graph database. diff --git a/lntest/test_common.go b/lntest/test_common.go index e858c168c..3259bf1cb 100644 --- a/lntest/test_common.go +++ b/lntest/test_common.go @@ -19,9 +19,9 @@ const ( // number and are determined by the results of nextAvailablePort(). defaultNodePort = 5555 - // listenerFormat is the format string that is used to generate local + // ListenerFormat is the format string that is used to generate local // listener addresses. - listenerFormat = "127.0.0.1:%d" + ListenerFormat = "127.0.0.1:%d" // NeutrinoBackendName is the name of the neutrino backend. NeutrinoBackendName = "neutrino" @@ -73,7 +73,7 @@ func NextAvailablePort() int { // the harness node, in practice in CI servers this seems much // less likely than simply some other process already being // bound at the start of the tests. - addr := fmt.Sprintf(listenerFormat, port) + addr := fmt.Sprintf(ListenerFormat, port) l, err := net.Listen("tcp4", addr) if err == nil { err := l.Close() @@ -117,8 +117,8 @@ func GetBtcdBinary() string { // addresses with unique ports and should be used to overwrite rpctest's // default generator which is prone to use colliding ports. func GenerateBtcdListenerAddresses() (string, string) { - return fmt.Sprintf(listenerFormat, NextAvailablePort()), - fmt.Sprintf(listenerFormat, NextAvailablePort()) + return fmt.Sprintf(ListenerFormat, NextAvailablePort()), + fmt.Sprintf(ListenerFormat, NextAvailablePort()) } // MakeOutpoint returns the outpoint of the channel's funding transaction.