Allow peers in dev mode (#2836)

This commit is contained in:
Andrea Lanfranchi 2021-10-18 20:36:01 +02:00 committed by GitHub
parent f82074125c
commit 839e0c9d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -871,7 +871,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config, nodeName, dataDir string) {
if ctx.GlobalString(ChainFlag.Name) == params.DevChainName {
// --dev mode can't use p2p networking.
cfg.MaxPeers = 0
// cfg.MaxPeers = 0 // It can have peers otherwise local sync is not possible
cfg.ListenAddr = ":0"
cfg.NoDiscovery = true
cfg.DiscoveryV5 = false