Ensure that `NewNodeConfigWithDefaults` builds a valid configuration
This commit is contained in:
parent
1f6cccd0fc
commit
87f1af0743
|
@ -253,6 +253,7 @@ func makeNodeConfig() (*params.NodeConfig, error) {
|
||||||
nodeConfig.LogFile = *logFile
|
nodeConfig.LogFile = *logFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nodeConfig.NoDiscovery = true
|
||||||
nodeConfig.ListenAddr = ""
|
nodeConfig.ListenAddr = ""
|
||||||
if *staticEnodeAddr != "" {
|
if *staticEnodeAddr != "" {
|
||||||
nodeConfig.ClusterConfig.Enabled = true
|
nodeConfig.ClusterConfig.Enabled = true
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Rendezvous": true,
|
"Rendezvous": true,
|
||||||
|
"NoDiscovery": false,
|
||||||
"ClusterConfig": {
|
"ClusterConfig": {
|
||||||
"Enabled": true,
|
"Enabled": true,
|
||||||
"Fleet": "eth.beta",
|
"Fleet": "eth.beta",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Rendezvous": true,
|
"Rendezvous": true,
|
||||||
|
"NoDiscovery": false,
|
||||||
"ClusterConfig": {
|
"ClusterConfig": {
|
||||||
"Enabled": true,
|
"Enabled": true,
|
||||||
"Fleet": "eth.staging",
|
"Fleet": "eth.staging",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"LogLevel": "DEBUG",
|
"LogLevel": "DEBUG",
|
||||||
|
"NoDiscovery": false,
|
||||||
"ClusterConfig": {
|
"ClusterConfig": {
|
||||||
"Enabled": true,
|
"Enabled": true,
|
||||||
"Fleet": "eth.test",
|
"Fleet": "eth.test",
|
||||||
|
|
|
@ -315,6 +315,7 @@ func WithFleet(fleet string) Option {
|
||||||
if fleet == FleetUndefined {
|
if fleet == FleetUndefined {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
c.NoDiscovery = false
|
||||||
c.ClusterConfig.Enabled = true
|
c.ClusterConfig.Enabled = true
|
||||||
return loadConfigFromAsset(fmt.Sprintf("../config/cli/fleet-%s.json", fleet), c)
|
return loadConfigFromAsset(fmt.Sprintf("../config/cli/fleet-%s.json", fleet), c)
|
||||||
}
|
}
|
||||||
|
@ -342,7 +343,7 @@ func NewNodeConfigWithDefaults(dataDir string, networkID uint64, opts ...Option)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
c.NoDiscovery = false
|
c.NoDiscovery = true
|
||||||
c.HTTPHost = ""
|
c.HTTPHost = ""
|
||||||
c.ListenAddr = ":30303"
|
c.ListenAddr = ":30303"
|
||||||
c.LogEnabled = true
|
c.LogEnabled = true
|
||||||
|
|
Loading…
Reference in New Issue