mirror of
https://github.com/status-im/status-go.git
synced 2025-02-16 08:50:09 +00:00
use random tcp port for wakuv2
This commit is contained in:
parent
f81758ec6e
commit
e8c1421997
@ -859,7 +859,7 @@ func NewNodeConfig(dataDir string, networkID uint64) (*NodeConfig, error) {
|
|||||||
},
|
},
|
||||||
WakuV2Config: WakuV2Config{
|
WakuV2Config: WakuV2Config{
|
||||||
Host: "0.0.0.0",
|
Host: "0.0.0.0",
|
||||||
Port: 60000,
|
Port: 0,
|
||||||
DataDir: wakuV2Dir,
|
DataDir: wakuV2Dir,
|
||||||
MaxMessageSize: wakuv2common.DefaultMaxMessageSize,
|
MaxMessageSize: wakuv2common.DefaultMaxMessageSize,
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ type Config struct {
|
|||||||
var DefaultConfig = Config{
|
var DefaultConfig = Config{
|
||||||
MaxMessageSize: common.DefaultMaxMessageSize,
|
MaxMessageSize: common.DefaultMaxMessageSize,
|
||||||
Host: "0.0.0.0",
|
Host: "0.0.0.0",
|
||||||
Port: 60000,
|
Port: 0,
|
||||||
KeepAliveInterval: 10, // second
|
KeepAliveInterval: 10, // second
|
||||||
DiscoveryLimit: 40,
|
DiscoveryLimit: 40,
|
||||||
MinPeersForRelay: 1, // TODO: determine correct value with Vac team
|
MinPeersForRelay: 1, // TODO: determine correct value with Vac team
|
||||||
@ -68,10 +68,6 @@ func setDefaults(cfg *Config) *Config {
|
|||||||
cfg.Host = DefaultConfig.Host
|
cfg.Host = DefaultConfig.Host
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.Port == 0 {
|
|
||||||
cfg.Port = DefaultConfig.Port
|
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.KeepAliveInterval == 0 {
|
if cfg.KeepAliveInterval == 0 {
|
||||||
cfg.KeepAliveInterval = DefaultConfig.KeepAliveInterval
|
cfg.KeepAliveInterval = DefaultConfig.KeepAliveInterval
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user