mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
Read static-nodes and trusted-nodes from default files if not specified in CLI
This commit is contained in:
parent
96228cc2dd
commit
3ae87c0d46
1 changed files with 6 additions and 0 deletions
|
|
@ -935,9 +935,15 @@ func (c *Config) buildNode() (*node.Config, error) {
|
|||
if cfg.P2P.StaticNodes, err = parseBootnodes(c.P2P.Discovery.StaticNodes); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(cfg.P2P.StaticNodes) == 0 {
|
||||
cfg.P2P.StaticNodes = cfg.StaticNodes()
|
||||
}
|
||||
if cfg.P2P.TrustedNodes, err = parseBootnodes(c.P2P.Discovery.TrustedNodes); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(cfg.P2P.TrustedNodes) == 0 {
|
||||
cfg.P2P.TrustedNodes = cfg.TrustedNodes()
|
||||
}
|
||||
}
|
||||
|
||||
if c.P2P.NoDiscover {
|
||||
|
|
|
|||
Loading…
Reference in a new issue