Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NIT-2626] Ignores P2P arguments provided through CLI arguments #2456

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cmd/genericconf/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ type P2PConfig struct {
}

func (p P2PConfig) Apply(stackConf *node.Config) {
stackConf.P2P.ListenAddr = p.ListenAddr
stackConf.P2P.NoDial = p.NoDial
stackConf.P2P.NoDiscovery = p.NoDiscovery
stackConf.P2P.MaxPeers = p.MaxPeers
stackConf.P2P.DiscoveryV5 = p.DiscoveryV5
stackConf.P2P.DiscoveryV4 = p.DiscoveryV4
stackConf.P2P.BootstrapNodes = parseBootnodes(p.Bootnodes)
stackConf.P2P.BootstrapNodesV5 = parseBootnodes(p.BootnodesV5)
stackConf.P2P.ListenAddr = P2PConfigDefault.ListenAddr
stackConf.P2P.NoDial = P2PConfigDefault.NoDial
stackConf.P2P.NoDiscovery = P2PConfigDefault.NoDiscovery
stackConf.P2P.MaxPeers = P2PConfigDefault.MaxPeers
stackConf.P2P.DiscoveryV5 = P2PConfigDefault.DiscoveryV5
stackConf.P2P.DiscoveryV4 = P2PConfigDefault.DiscoveryV4
stackConf.P2P.BootstrapNodes = parseBootnodes(P2PConfigDefault.Bootnodes)
stackConf.P2P.BootstrapNodesV5 = parseBootnodes(P2PConfigDefault.BootnodesV5)
}

func parseBootnodes(urls []string) []*enode.Node {
Expand Down
Loading