This commit is contained in:
Chase Wright 2017-11-16 11:15:07 +00:00 committed by GitHub
commit 63870dfb29

View file

@ -956,6 +956,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
// Avoid conflicting network flags
checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag)
checkExclusive(ctx, FastSyncFlag, LightModeFlag, SyncModeFlag)
checkExclusive(ctx, LightModeFlag, LightServFlag)
checkExclusive(ctx, LightModeFlag, LightPeersFlag)
ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
setEtherbase(ctx, ks, cfg)
@ -971,10 +973,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
case ctx.GlobalBool(LightModeFlag.Name):
cfg.SyncMode = downloader.LightSync
}
if ctx.GlobalIsSet(LightServFlag.Name) {
if ctx.GlobalIsSet(LightServFlag.Name) && cfg.SyncMode != downloader.LightSync {
cfg.LightServ = ctx.GlobalInt(LightServFlag.Name)
}
if ctx.GlobalIsSet(LightPeersFlag.Name) {
if ctx.GlobalIsSet(LightPeersFlag.Name) && cfg.SyncMode != downloader.LightSync {
cfg.LightPeers = ctx.GlobalInt(LightPeersFlag.Name)
}
if ctx.GlobalIsSet(NetworkIdFlag.Name) {