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