diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-20 17:01:15 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:50 +0800 |
commit | 7f18d9d9823e641360f3a98606b5f94256dd7182 (patch) | |
tree | 03c1567598449677d7fbf1808c15ceb2d303cc0d /cmd/utils/flags.go | |
parent | 0a3d913bf68dd165337ac20977b8379fd1acf469 (diff) | |
download | dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.tar dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.tar.gz dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.tar.bz2 dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.tar.lz dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.tar.xz dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.tar.zst dexon-7f18d9d9823e641360f3a98606b5f94256dd7182.zip |
Remove reference of Rinkeby network.
We do not need ethereum Rinkeby network in our system, remove it.
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r-- | cmd/utils/flags.go | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2a1f8c765..cf41f5cdd 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -130,21 +130,13 @@ var ( } NetworkIdFlag = cli.Uint64Flag{ Name: "networkid", - Usage: "Network identifier (integer, 237=Mainnet, 238=Testnet)", + Usage: "Network identifier (integer, 237=Mainnet, 238=Testnet) (default: 237)", Value: eth.DefaultConfig.NetworkId, } TestnetFlag = cli.BoolFlag{ Name: "testnet", Usage: "Ropsten network: pre-configured proof-of-work test network", } - RinkebyFlag = cli.BoolFlag{ - Name: "rinkeby", - Usage: "Rinkeby network: pre-configured proof-of-authority test network", - } - GoerliFlag = cli.BoolFlag{ - Name: "goerli", - Usage: "Görli network: pre-configured proof-of-authority test network", - } ConstantinopleOverrideFlag = cli.Uint64Flag{ Name: "override.constantinople", Usage: "Manually specify constantinople fork-block, overriding the bundled setting", @@ -653,12 +645,6 @@ func MakeDataDir(ctx *cli.Context) string { if ctx.GlobalBool(TestnetFlag.Name) { return filepath.Join(path, "testnet") } - if ctx.GlobalBool(RinkebyFlag.Name) { - return filepath.Join(path, "rinkeby") - } - if ctx.GlobalBool(GoerliFlag.Name) { - return filepath.Join(path, "goerli") - } return path } Fatalf("Cannot determine default data directory, please set manually (--datadir)") @@ -711,10 +697,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { } case ctx.GlobalBool(TestnetFlag.Name): urls = params.TestnetBootnodes - case ctx.GlobalBool(RinkebyFlag.Name): - urls = params.RinkebyBootnodes - case ctx.GlobalBool(GoerliFlag.Name): - urls = params.GoerliBootnodes case cfg.BootstrapNodes != nil: return // already set, don't apply defaults. } @@ -740,10 +722,6 @@ func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) { } else { urls = strings.Split(ctx.GlobalString(BootnodesFlag.Name), ",") } - case ctx.GlobalBool(RinkebyFlag.Name): - urls = params.RinkebyBootnodes - case ctx.GlobalBool(GoerliFlag.Name): - urls = params.GoerliBootnodes case cfg.BootstrapNodesV5 != nil: return // already set, don't apply defaults. } @@ -1018,10 +996,6 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) { cfg.DataDir = "" // unless explicitly requested, use memory databases case ctx.GlobalBool(TestnetFlag.Name): cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet") - case ctx.GlobalBool(RinkebyFlag.Name): - cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby") - case ctx.GlobalBool(GoerliFlag.Name): - cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli") } } @@ -1178,7 +1152,7 @@ func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) { // SetDexConfig applies eth-related command line flags to the config. func SetDexConfig(ctx *cli.Context, stack *node.Node, cfg *dex.Config) { // Avoid conflicting network flags - checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag, GoerliFlag) + checkExclusive(ctx, DeveloperFlag, TestnetFlag) checkExclusive(ctx, LightServFlag, SyncModeFlag, "light") ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore) @@ -1236,19 +1210,9 @@ func SetDexConfig(ctx *cli.Context, stack *node.Node, cfg *dex.Config) { switch { case ctx.GlobalBool(TestnetFlag.Name): if !ctx.GlobalIsSet(NetworkIdFlag.Name) { - cfg.NetworkId = 3 + cfg.NetworkId = 238 } cfg.Genesis = core.DefaultTestnetGenesisBlock() - case ctx.GlobalBool(RinkebyFlag.Name): - if !ctx.GlobalIsSet(NetworkIdFlag.Name) { - cfg.NetworkId = 4 - } - cfg.Genesis = core.DefaultRinkebyGenesisBlock() - case ctx.GlobalBool(GoerliFlag.Name): - if !ctx.GlobalIsSet(NetworkIdFlag.Name) { - cfg.NetworkId = 5 - } - cfg.Genesis = core.DefaultGoerliGenesisBlock() case ctx.GlobalBool(DeveloperFlag.Name): if !ctx.GlobalIsSet(NetworkIdFlag.Name) { cfg.NetworkId = 1337 @@ -1402,10 +1366,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis { switch { case ctx.GlobalBool(TestnetFlag.Name): genesis = core.DefaultTestnetGenesisBlock() - case ctx.GlobalBool(RinkebyFlag.Name): - genesis = core.DefaultRinkebyGenesisBlock() - case ctx.GlobalBool(GoerliFlag.Name): - genesis = core.DefaultGoerliGenesisBlock() case ctx.GlobalBool(DeveloperFlag.Name): Fatalf("Developer chains are ephemeral") } |