diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-25 18:55:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 18:51:25 +0800 |
commit | f97b8033c8c79f133417805fdd84bc1c36a36089 (patch) | |
tree | 26a45a01eac49db6758cf0e3dda5d1d1a57978f2 /cmd/geth | |
parent | 5966f431920a13294b0d867285d5e0d28b5ee470 (diff) | |
download | dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.gz dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.bz2 dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.lz dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.xz dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.zst dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.zip |
Use dex.Config instead of eth.Config
Diffstat (limited to 'cmd/geth')
-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 59f759f0e..2c3450b2a 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -21,7 +21,6 @@ import ( "errors" "fmt" "io" - "math/big" "os" "reflect" "unicode" @@ -30,7 +29,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" @@ -76,7 +75,7 @@ type ethstatsConfig struct { } type gethConfig struct { - Eth eth.Config + Dex dex.Config Shh whisper.Config Node node.Config Ethstats ethstatsConfig @@ -111,7 +110,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, @@ -130,7 +129,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) } @@ -153,10 +152,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) @@ -189,8 +186,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" } |