mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
b95923e25c
commit
4f7159b119
2 changed files with 11 additions and 6 deletions
|
|
@ -681,9 +681,11 @@ var (
|
|||
Category: flags.NetworkingCategory,
|
||||
}
|
||||
DiscoveryV5Flag = &cli.BoolFlag{
|
||||
Name: "v5disc",
|
||||
Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism",
|
||||
Name: "discovery-v5",
|
||||
Aliases: []string{"discv5"},
|
||||
Usage: "Enables the V5 discovery mechanism",
|
||||
Category: flags.NetworkingCategory,
|
||||
Value: node.DefaultConfig.P2P.DiscoveryV5,
|
||||
}
|
||||
NetrestrictFlag = &cli.StringFlag{
|
||||
Name: "netrestrict",
|
||||
|
|
@ -1296,7 +1298,9 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
|
|||
}
|
||||
|
||||
flags.CheckExclusive(ctx, DiscoveryV5Flag, NoDiscoverFlag)
|
||||
cfg.DiscoveryV5 = ctx.Bool(DiscoveryV5Flag.Name)
|
||||
if ctx.IsSet(DiscoveryV5Flag.Name) {
|
||||
cfg.DiscoveryV5 = ctx.Bool(DiscoveryV5Flag.Name)
|
||||
}
|
||||
|
||||
if netrestrict := ctx.String(NetrestrictFlag.Name); netrestrict != "" {
|
||||
list, err := netutil.ParseNetlist(netrestrict)
|
||||
|
|
|
|||
|
|
@ -67,9 +67,10 @@ var DefaultConfig = Config{
|
|||
BatchRequestLimit: 1000,
|
||||
BatchResponseMaxSize: 25 * 1000 * 1000,
|
||||
P2P: p2p.Config{
|
||||
ListenAddr: ":30303",
|
||||
MaxPeers: 50,
|
||||
NAT: nat.Any(),
|
||||
ListenAddr: ":30303",
|
||||
MaxPeers: 50,
|
||||
NAT: nat.Any(),
|
||||
DiscoveryV5: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue