aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/config.go
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-06-21 16:49:14 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-06-21 16:49:14 +0800
commit7a11e86442ab51401ad764777666133d82656264 (patch)
tree29154393cabb1e0f55e267b6bbf17bc6e28c37b4 /cmd/geth/config.go
parent4a1d516d78f61937d850c6622bc26955b5103a23 (diff)
downloadgo-tangerine-7a11e86442ab51401ad764777666133d82656264.tar
go-tangerine-7a11e86442ab51401ad764777666133d82656264.tar.gz
go-tangerine-7a11e86442ab51401ad764777666133d82656264.tar.bz2
go-tangerine-7a11e86442ab51401ad764777666133d82656264.tar.lz
go-tangerine-7a11e86442ab51401ad764777666133d82656264.tar.xz
go-tangerine-7a11e86442ab51401ad764777666133d82656264.tar.zst
go-tangerine-7a11e86442ab51401ad764777666133d82656264.zip
whisper: move flags from whisper package to utils
Diffstat (limited to 'cmd/geth/config.go')
-rw-r--r--cmd/geth/config.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/geth/config.go b/cmd/geth/config.go
index 6a0183204..d3600f141 100644
--- a/cmd/geth/config.go
+++ b/cmd/geth/config.go
@@ -43,7 +43,7 @@ var (
Name: "dumpconfig",
Usage: "Show configuration values",
ArgsUsage: "",
- Flags: append(append(nodeFlags, rpcFlags...), whisper.Flags...),
+ Flags: append(append(nodeFlags, rpcFlags...), whisperFlags...),
Category: "MISCELLANEOUS COMMANDS",
Description: `The dumpconfig command shows configuration values.`,
}
@@ -140,7 +140,7 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
// enableWhisper returns true in case one of the whisper flags is set.
func enableWhisper(ctx *cli.Context) bool {
- for _, flag := range whisper.Flags {
+ for _, flag := range whisperFlags {
if ctx.GlobalIsSet(flag.GetName()) {
return true
}
@@ -155,13 +155,13 @@ func makeFullNode(ctx *cli.Context) *node.Node {
// Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode
shhEnabled := enableWhisper(ctx)
- shhAutoEnabled := !ctx.GlobalIsSet(whisper.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DevModeFlag.Name)
+ shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DevModeFlag.Name)
if shhEnabled || shhAutoEnabled {
- if ctx.GlobalIsSet(whisper.MaxMessageSizeFlag.Name) {
- cfg.Shh.MaxMessageSize = uint32(ctx.Int(whisper.MaxMessageSizeFlag.Name))
+ if ctx.GlobalIsSet(utils.WhisperMaxMessageSizeFlag.Name) {
+ cfg.Shh.MaxMessageSize = uint32(ctx.Int(utils.WhisperMaxMessageSizeFlag.Name))
}
- if ctx.GlobalIsSet(whisper.MinPOWFlag.Name) {
- cfg.Shh.MinimumAcceptedPOW = ctx.Float64(whisper.MinPOWFlag.Name)
+ if ctx.GlobalIsSet(utils.WhisperMinPOWFlag.Name) {
+ cfg.Shh.MinimumAcceptedPOW = ctx.Float64(utils.WhisperMinPOWFlag.Name)
}
utils.RegisterShhService(stack, &cfg.Shh)
}