Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
4df80ce8
Unverified
Commit
4df80ce8
authored
Sep 04, 2023
by
OptimismBot
Committed by
GitHub
Sep 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7098 from ethereum-optimism/aj/fix-netrestrict
op-node: Default to no netrestrict instead of allow none
parents
2f745cb5
c33e8084
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
p2p_flags.go
op-node/flags/p2p_flags.go
+0
-1
load_config.go
op-node/p2p/cli/load_config.go
+6
-5
No files found.
op-node/flags/p2p_flags.go
View file @
4df80ce8
...
@@ -156,7 +156,6 @@ var (
...
@@ -156,7 +156,6 @@ var (
Name
:
"p2p.netrestrict"
,
Name
:
"p2p.netrestrict"
,
Usage
:
"Comma-separated list of CIDR masks. P2P will only try to connect on these networks"
,
Usage
:
"Comma-separated list of CIDR masks. P2P will only try to connect on these networks"
,
Required
:
false
,
Required
:
false
,
Value
:
""
,
EnvVars
:
p2pEnv
(
"NETRESTRICT"
),
EnvVars
:
p2pEnv
(
"NETRESTRICT"
),
}
}
HostMux
=
&
cli
.
StringFlag
{
HostMux
=
&
cli
.
StringFlag
{
...
...
op-node/p2p/cli/load_config.go
View file @
4df80ce8
...
@@ -194,13 +194,14 @@ func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
...
@@ -194,13 +194,14 @@ func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
conf
.
Bootnodes
=
p2p
.
DefaultBootnodes
conf
.
Bootnodes
=
p2p
.
DefaultBootnodes
}
}
netRestrict
,
err
:=
netutil
.
ParseNetlist
(
ctx
.
String
(
flags
.
NetRestrict
.
Name
))
if
ctx
.
IsSet
(
flags
.
NetRestrict
.
Name
)
{
if
err
!=
nil
{
netRestrict
,
err
:=
netutil
.
ParseNetlist
(
ctx
.
String
(
flags
.
NetRestrict
.
Name
))
return
fmt
.
Errorf
(
"failed to parse net list: %w"
,
err
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to parse net list: %w"
,
err
)
}
conf
.
NetRestrict
=
netRestrict
}
}
conf
.
NetRestrict
=
netRestrict
return
nil
return
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment