diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-25 18:55:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:21:31 +0800 |
commit | 2ba220653fdf945844896458821808f2edd8f4af (patch) | |
tree | 5fb24eed28de25b59e12c7472a222f2a338e2f53 /cmd/geth/config.go | |
parent | 94bb940818d9b5c6d654da14f13918e65cf84623 (diff) | |
download | go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.gz go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.bz2 go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.lz go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.xz go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.zst go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.zip |
Use dex.Config instead of eth.Config
Diffstat (limited to 'cmd/geth/config.go')
-rw-r--r-- | cmd/geth/config.go | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/cmd/geth/config.go b/cmd/geth/config.go index f1e281196..6e37fd397 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -20,7 +20,6 @@ import ( "bufio" "errors" "fmt" - "math/big" "os" "reflect" "unicode" @@ -29,7 +28,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/dashboard" - "github.com/ethereum/go-ethereum/eth" + "github.com/ethereum/go-ethereum/dex" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" @@ -75,7 +74,7 @@ type ethstatsConfig struct { } type gethConfig struct { - Eth eth.Config + Dex dex.Config Shh whisper.Config Node node.Config Ethstats ethstatsConfig @@ -110,7 +109,7 @@ func defaultNodeConfig() node.Config { func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) { // Load defaults. cfg := gethConfig{ - Eth: eth.DefaultConfig, + Dex: dex.DefaultConfig, Shh: whisper.DefaultConfig, Node: defaultNodeConfig(), Dashboard: dashboard.DefaultConfig, @@ -129,7 +128,7 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) { if err != nil { utils.Fatalf("Failed to create the protocol stack: %v", err) } - utils.SetEthConfig(ctx, stack, &cfg.Eth) + utils.SetDexConfig(ctx, stack, &cfg.Dex) if ctx.GlobalIsSet(utils.EthStatsURLFlag.Name) { cfg.Ethstats.URL = ctx.GlobalString(utils.EthStatsURLFlag.Name) } @@ -152,10 +151,8 @@ func enableWhisper(ctx *cli.Context) bool { func makeFullNode(ctx *cli.Context) *node.Node { stack, cfg := makeConfigNode(ctx) - if ctx.GlobalIsSet(utils.ConstantinopleOverrideFlag.Name) { - cfg.Eth.ConstantinopleOverride = new(big.Int).SetUint64(ctx.GlobalUint64(utils.ConstantinopleOverrideFlag.Name)) - } - utils.RegisterEthService(stack, &cfg.Eth) + + utils.RegisterDexService(stack, &cfg.Dex) if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) { utils.RegisterDashboardService(stack, &cfg.Dashboard, gitCommit) @@ -188,8 +185,8 @@ func dumpConfig(ctx *cli.Context) error { _, cfg := makeConfigNode(ctx) comment := "" - if cfg.Eth.Genesis != nil { - cfg.Eth.Genesis = nil + if cfg.Dex.Genesis != nil { + cfg.Dex.Genesis = nil comment += "# Note: this config doesn't contain the genesis block.\n\n" } |