Go-ethereum: Disallow `--lightserv` in light mode

Created on 15 Nov 2017  路  4Comments  路  Source: ethereum/go-ethereum

Currently Geth seems happy to accept --lightserv in combination with --light/--syncmode=light. This doesn't really make any sense. Let's forbid it!

We should expand these https://github.com/ethereum/go-ethereum/blob/master/cmd/utils/flags.go#L958 with an exclusivity check between --lightserv, --light and --syncmode=light.

good first issue help wanted

Most helpful comment

That's the question needs solving, yes :)

All 4 comments

I totally agree! :)

I assume that means we should add:
checkExclusive(ctx, LightModeFlag, LightServFlag)

But I don't know how to define a checkExclusive on SyncModeFlag's value?

That's the question needs solving, yes :)

Hi, I made a solution with interface{} as you suggested in Mystic's commit.
Just waiting for a pull request to be merged on the CLI package for convenience:
https://github.com/urfave/cli/pull/685

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keitaj picture keitaj  路  3Comments

ysqi picture ysqi  路  3Comments

VoR0220 picture VoR0220  路  3Comments

JMaxU picture JMaxU  路  3Comments

cheershendtco picture cheershendtco  路  3Comments