diff options
author | bas-vk <bas-vk@users.noreply.github.com> | 2017-04-13 05:04:14 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-04-13 05:04:14 +0800 |
commit | 5e29f4be935ff227bbf07a0c6e80e8809f5e0202 (patch) | |
tree | 18e1ef8db3c66c3bf777dc90326aa971f1343d34 /cmd | |
parent | 43671067fb453a1ed798bcc3d8016710460f2bdf (diff) | |
download | go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.tar go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.tar.gz go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.tar.bz2 go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.tar.lz go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.tar.xz go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.tar.zst go-tangerine-5e29f4be935ff227bbf07a0c6e80e8809f5e0202.zip |
cmd/utils, node: remove unused solc references and improve RPC config (#14324)
Currently http cors and websocket origins are a comma separated string in the
config object. These are replaced with string arrays that are more expressive in
case of a config file.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/geth/main.go | 1 | ||||
-rw-r--r-- | cmd/geth/usage.go | 6 | ||||
-rw-r--r-- | cmd/utils/flags.go | 23 |
3 files changed, 7 insertions, 23 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 8e434948e..5fb50c4ad 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -140,7 +140,6 @@ func init() { utils.MetricsEnabledFlag, utils.FakePoWFlag, utils.NoCompactionFlag, - utils.SolcPathFlag, utils.GpoBlocksFlag, utils.GpoPercentileFlag, utils.ExtraDataFlag, diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 334d017d9..a172b4775 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -174,12 +174,6 @@ var AppHelpFlagGroups = []flagGroup{ utils.WhisperEnabledFlag, }, }, - { - Name: "MISCELLANEOUS", - Flags: []cli.Flag{ - utils.SolcPathFlag, - }, - }, } func init() { diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 1bd77139c..b35574c86 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -392,11 +392,6 @@ var ( Usage: "JavaScript root path for `loadScript`", Value: ".", } - SolcPathFlag = cli.StringFlag{ - Name: "solc", - Usage: "Solidity compiler command to be used", - Value: "solc", - } // Gas price oracle settings GpoBlocksFlag = cli.IntFlag{ @@ -528,9 +523,9 @@ func setNAT(ctx *cli.Context, cfg *p2p.Config) { } } -// makeRPCModules splits input separated by a comma and trims excessive white -// space from the substrings. -func makeRPCModules(input string) []string { +// splitAndTrim splits input separated by a comma +// and trims excessive white space from the substrings. +func splitAndTrim(input string) []string { result := strings.Split(input, ",") for i, r := range result { result[i] = strings.TrimSpace(r) @@ -552,10 +547,10 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) { cfg.HTTPPort = ctx.GlobalInt(RPCPortFlag.Name) } if ctx.GlobalIsSet(RPCCORSDomainFlag.Name) { - cfg.HTTPCors = ctx.GlobalString(RPCCORSDomainFlag.Name) + cfg.HTTPCors = splitAndTrim(ctx.GlobalString(RPCCORSDomainFlag.Name)) } if ctx.GlobalIsSet(RPCApiFlag.Name) { - cfg.HTTPModules = makeRPCModules(ctx.GlobalString(RPCApiFlag.Name)) + cfg.HTTPModules = splitAndTrim(ctx.GlobalString(RPCApiFlag.Name)) } } @@ -573,10 +568,10 @@ func setWS(ctx *cli.Context, cfg *node.Config) { cfg.WSPort = ctx.GlobalInt(WSPortFlag.Name) } if ctx.GlobalIsSet(WSAllowedOriginsFlag.Name) { - cfg.WSOrigins = ctx.GlobalString(WSAllowedOriginsFlag.Name) + cfg.WSOrigins = splitAndTrim(ctx.GlobalString(WSAllowedOriginsFlag.Name)) } if ctx.GlobalIsSet(WSApiFlag.Name) { - cfg.WSModules = makeRPCModules(ctx.GlobalString(WSApiFlag.Name)) + cfg.WSModules = splitAndTrim(ctx.GlobalString(WSApiFlag.Name)) } } @@ -828,10 +823,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { if ctx.GlobalIsSet(GasPriceFlag.Name) { cfg.GasPrice = GlobalBig(ctx, GasPriceFlag.Name) } - - if ctx.GlobalIsSet(SolcPathFlag.Name) { - cfg.SolcPath = ctx.GlobalString(SolcPathFlag.Name) - } if ctx.GlobalIsSet(VMEnableDebugFlag.Name) { // TODO(fjl): force-enable this in --dev mode cfg.EnablePreimageRecording = ctx.GlobalBool(VMEnableDebugFlag.Name) |