Prevent RendezvousNodes to be overwritten by empty cli flag (#1174)
This commit is contained in:
parent
5ef26596e4
commit
776248a42f
|
@ -257,7 +257,9 @@ func makeNodeConfig() (*params.NodeConfig, error) {
|
||||||
nodeConfig.ClusterConfig.BootNodes = nil
|
nodeConfig.ClusterConfig.BootNodes = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
nodeConfig.ClusterConfig.RendezvousNodes = []string(rendezvousNodes)
|
if len(rendezvousNodes) > 0 {
|
||||||
|
nodeConfig.ClusterConfig.RendezvousNodes = []string(rendezvousNodes)
|
||||||
|
}
|
||||||
nodeConfig.NoDiscovery = !(*discoveryFlag)
|
nodeConfig.NoDiscovery = !(*discoveryFlag)
|
||||||
nodeConfig.Rendezvous = *rendezvous
|
nodeConfig.Rendezvous = *rendezvous
|
||||||
nodeConfig.RequireTopics = map[discv5.Topic]params.Limits(searchTopics)
|
nodeConfig.RequireTopics = map[discv5.Topic]params.Limits(searchTopics)
|
||||||
|
|
|
@ -122,6 +122,8 @@ func (n *StatusNode) Start(config *params.NodeConfig, services ...node.ServiceCo
|
||||||
n.mu.Lock()
|
n.mu.Lock()
|
||||||
defer n.mu.Unlock()
|
defer n.mu.Unlock()
|
||||||
|
|
||||||
|
n.log.Debug("starting with NodeConfig", "ClusterConfig", config.ClusterConfig)
|
||||||
|
|
||||||
if n.isRunning() {
|
if n.isRunning() {
|
||||||
return ErrNodeRunning
|
return ErrNodeRunning
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue