aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/config.go14
-rw-r--r--cmd/geth/main.go9
-rw-r--r--cmd/geth/usage.go3
3 files changed, 15 insertions, 11 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)
}
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index c5f783a08..ea87a3224 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -35,7 +35,6 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/node"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
"gopkg.in/urfave/cli.v1"
)
@@ -125,6 +124,12 @@ var (
utils.IPCDisabledFlag,
utils.IPCPathFlag,
}
+
+ whisperFlags = []cli.Flag{
+ utils.WhisperEnabledFlag,
+ utils.WhisperMaxMessageSizeFlag,
+ utils.WhisperMinPOWFlag,
+ }
)
func init() {
@@ -161,7 +166,7 @@ func init() {
app.Flags = append(app.Flags, rpcFlags...)
app.Flags = append(app.Flags, consoleFlags...)
app.Flags = append(app.Flags, debug.Flags...)
- app.Flags = append(app.Flags, whisper.Flags...)
+ app.Flags = append(app.Flags, whisperFlags...)
app.Before = func(ctx *cli.Context) error {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go
index 4a3e22af8..bb14de747 100644
--- a/cmd/geth/usage.go
+++ b/cmd/geth/usage.go
@@ -24,7 +24,6 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/internal/debug"
- "github.com/ethereum/go-ethereum/whisper/whisperv5"
"gopkg.in/urfave/cli.v1"
)
@@ -190,7 +189,7 @@ var AppHelpFlagGroups = []flagGroup{
},
{
Name: "Whisper (EXPERIMENTAL)",
- Flags: whisperv5.Flags,
+ Flags: whisperFlags,
},
{
Name: "DEPRECATED",