File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -1368,8 +1368,12 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
13681368
13691369 flags .CheckExclusive (ctx , DiscoveryV4Flag , NoDiscoverFlag )
13701370 flags .CheckExclusive (ctx , DiscoveryV5Flag , NoDiscoverFlag )
1371- cfg .DiscoveryV4 = ctx .Bool (DiscoveryV4Flag .Name )
1372- cfg .DiscoveryV5 = ctx .Bool (DiscoveryV5Flag .Name )
1371+ if ctx .IsSet (DiscoveryV4Flag .Name ) {
1372+ cfg .DiscoveryV4 = ctx .Bool (DiscoveryV4Flag .Name )
1373+ }
1374+ if ctx .IsSet (DiscoveryV5Flag .Name ) {
1375+ cfg .DiscoveryV5 = ctx .Bool (DiscoveryV5Flag .Name )
1376+ }
13731377
13741378 if netrestrict := ctx .String (NetrestrictFlag .Name ); netrestrict != "" {
13751379 list , err := netutil .ParseNetlist (netrestrict )
Original file line number Diff line number Diff line change @@ -69,9 +69,11 @@ var DefaultConfig = Config{
6969 BatchResponseMaxSize : 25 * 1000 * 1000 ,
7070 GraphQLVirtualHosts : []string {"localhost" },
7171 P2P : p2p.Config {
72- ListenAddr : ":30303" ,
73- MaxPeers : 50 ,
74- NAT : nat .Any (),
72+ ListenAddr : ":30303" ,
73+ MaxPeers : 50 ,
74+ NAT : nat .Any (),
75+ DiscoveryV4 : true ,
76+ DiscoveryV5 : true ,
7577 },
7678 DBEngine : "" , // Use whatever exists, will default to Pebble if non-existent and supported
7779}
You can’t perform that action at this time.
0 commit comments