diff --git a/pkg/network/server.go b/pkg/network/server.go index 6830c4612..31f591a95 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -149,7 +149,7 @@ func NewServer(config ServerConfig, chain blockchainer.Blockchainer, log *zap.Lo s.AttemptConnPeers = defaultAttemptConnPeers } - s.transport = NewTCPTransport(s, fmt.Sprintf("%s:%d", config.Address, config.Port), s.log) + s.transport = NewTCPTransport(s, net.JoinHostPort(config.Address, strconv.Itoa(int(config.Port))), s.log) s.discovery = NewDefaultDiscovery( s.DialTimeout, s.transport,