aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/config.go')
-rw-r--r--cmd/geth/config.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/cmd/geth/config.go b/cmd/geth/config.go
index d3600f141..27490c404 100644
--- a/cmd/geth/config.go
+++ b/cmd/geth/config.go
@@ -30,6 +30,7 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/contracts/release"
+ "github.com/ethereum/go-ethereum/dashboard"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
@@ -76,10 +77,11 @@ type ethstatsConfig struct {
}
type gethConfig struct {
- Eth eth.Config
- Shh whisper.Config
- Node node.Config
- Ethstats ethstatsConfig
+ Eth eth.Config
+ Shh whisper.Config
+ Node node.Config
+ Ethstats ethstatsConfig
+ Dashboard dashboard.Config
}
func loadConfig(file string, cfg *gethConfig) error {
@@ -110,9 +112,10 @@ func defaultNodeConfig() node.Config {
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
// Load defaults.
cfg := gethConfig{
- Eth: eth.DefaultConfig,
- Shh: whisper.DefaultConfig,
- Node: defaultNodeConfig(),
+ Eth: eth.DefaultConfig,
+ Shh: whisper.DefaultConfig,
+ Node: defaultNodeConfig(),
+ Dashboard: dashboard.DefaultConfig,
}
// Load config file.
@@ -134,6 +137,7 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
}
utils.SetShhConfig(ctx, stack, &cfg.Shh)
+ utils.SetDashboardConfig(ctx, &cfg.Dashboard)
return stack, cfg
}
@@ -153,9 +157,12 @@ func makeFullNode(ctx *cli.Context) *node.Node {
utils.RegisterEthService(stack, &cfg.Eth)
+ if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) {
+ utils.RegisterDashboardService(stack, &cfg.Dashboard)
+ }
// Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode
shhEnabled := enableWhisper(ctx)
- shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DevModeFlag.Name)
+ shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DeveloperFlag.Name)
if shhEnabled || shhAutoEnabled {
if ctx.GlobalIsSet(utils.WhisperMaxMessageSizeFlag.Name) {
cfg.Shh.MaxMessageSize = uint32(ctx.Int(utils.WhisperMaxMessageSizeFlag.Name))