lntest: export ListenerFormat constant
This commit is contained in:
2 files changed
+8
-8
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user