use random tcp port for wakuv2

This commit is contained in:
frank 2023-02-23 19:19:23 +08:00
parent f81758ec6e
commit e8c1421997
2 changed files with 2 additions and 6 deletions

View File

@ -859,7 +859,7 @@ func NewNodeConfig(dataDir string, networkID uint64) (*NodeConfig, error) {
},
WakuV2Config: WakuV2Config{
Host: "0.0.0.0",
Port: 60000,
Port: 0,
DataDir: wakuV2Dir,
MaxMessageSize: wakuv2common.DefaultMaxMessageSize,
},

View File

@ -48,7 +48,7 @@ type Config struct {
var DefaultConfig = Config{
MaxMessageSize: common.DefaultMaxMessageSize,
Host: "0.0.0.0",
Port: 60000,
Port: 0,
KeepAliveInterval: 10, // second
DiscoveryLimit: 40,
MinPeersForRelay: 1, // TODO: determine correct value with Vac team
@ -68,10 +68,6 @@ func setDefaults(cfg *Config) *Config {
cfg.Host = DefaultConfig.Host
}
if cfg.Port == 0 {
cfg.Port = DefaultConfig.Port
}
if cfg.KeepAliveInterval == 0 {
cfg.KeepAliveInterval = DefaultConfig.KeepAliveInterval
}