aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils
diff options
context:
space:
mode:
authorWei-Ning Huang <w@byzantine-lab.io>2019-06-16 14:31:45 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-09-17 16:57:30 +0800
commit8dddb63449d3d1439357a3bccd5c3cf828136ea5 (patch)
tree3e1097004e9e0266ff5d7562fd7a2461134b9504 /cmd/utils
parent35998179f05b6c65250ef2dcfd8f83e49d2280a8 (diff)
downloadgo-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.tar
go-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.tar.gz
go-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.tar.bz2
go-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.tar.lz
go-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.tar.xz
go-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.tar.zst
go-tangerine-8dddb63449d3d1439357a3bccd5c3cf828136ea5.zip
params: update testnet and remove DEXON testnets
Diffstat (limited to 'cmd/utils')
-rw-r--r--cmd/utils/flags.go54
1 files changed, 4 insertions, 50 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 544f328b8..2e1053c83 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, 239=Taipei, 240=Yilan) (default: 237)",
- Value: eth.DefaultConfig.NetworkId,
+ Usage: "Network identifier (integer, 373=Mainnet, 374=Testnet) (default: 373)",
+ Value: dex.DefaultConfig.NetworkId,
}
TestnetFlag = cli.BoolFlag{
Name: "testnet",
Usage: "Taiwan network: default public testnet",
}
- TaipeiFlag = cli.BoolFlag{
- Name: "taipei",
- Usage: "Taipei network: tapei public testnet",
- }
- YilanFlag = cli.BoolFlag{
- Name: "yilan",
- Usage: "Yilan network: yilan public testnet",
- }
ConstantinopleOverrideFlag = cli.Uint64Flag{
Name: "override.constantinople",
Usage: "Manually specify constantinople fork-block, overriding the bundled setting",
@@ -681,12 +673,6 @@ func MakeDataDir(ctx *cli.Context) string {
if ctx.GlobalBool(TestnetFlag.Name) {
return filepath.Join(path, "testnet")
}
- if ctx.GlobalBool(TaipeiFlag.Name) {
- return filepath.Join(path, "taipei")
- }
- if ctx.GlobalBool(YilanFlag.Name) {
- return filepath.Join(path, "yilan")
- }
return path
}
Fatalf("Cannot determine default data directory, please set manually (--datadir)")
@@ -739,10 +725,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
}
case ctx.GlobalBool(TestnetFlag.Name):
urls = params.TestnetBootnodes
- case ctx.GlobalBool(TaipeiFlag.Name):
- urls = params.TaipeiBootnodes
- case ctx.GlobalBool(YilanFlag.Name):
- urls = params.YilanBootnodes
case cfg.BootstrapNodes != nil:
return // already set, don't apply defaults.
}
@@ -768,10 +750,6 @@ func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
} else {
urls = strings.Split(ctx.GlobalString(BootnodesFlag.Name), ",")
}
- case ctx.GlobalBool(TaipeiFlag.Name):
- urls = params.TaipeiBootnodes
- case ctx.GlobalBool(YilanFlag.Name):
- urls = params.YilanBootnodes
case cfg.BootstrapNodesV5 != nil:
return // already set, don't apply defaults.
}
@@ -1046,10 +1024,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(TaipeiFlag.Name):
- cfg.DataDir = filepath.Join(node.DefaultDataDir(), "taipei")
- case ctx.GlobalBool(YilanFlag.Name):
- cfg.DataDir = filepath.Join(node.DefaultDataDir(), "yilan")
}
}
@@ -1206,7 +1180,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, TaipeiFlag, YilanFlag)
+ checkExclusive(ctx, DeveloperFlag, TestnetFlag)
checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
@@ -1272,28 +1246,12 @@ func SetDexConfig(ctx *cli.Context, stack *node.Node, cfg *dex.Config) {
switch {
case ctx.GlobalBool(TestnetFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
- cfg.NetworkId = 238
+ cfg.NetworkId = 374
}
if !ctx.GlobalIsSet(RecoveryNetworkRPCFlag.Name) {
cfg.RecoveryNetworkRPC = defaultRecoveryNetworkRPC
}
cfg.Genesis = core.DefaultTestnetGenesisBlock()
- case ctx.GlobalBool(TaipeiFlag.Name):
- if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
- cfg.NetworkId = 239
- }
- if !ctx.GlobalIsSet(RecoveryNetworkRPCFlag.Name) {
- cfg.RecoveryNetworkRPC = defaultRecoveryNetworkRPC
- }
- cfg.Genesis = core.DefaultTaipeiGenesisBlock()
- case ctx.GlobalBool(YilanFlag.Name):
- if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
- cfg.NetworkId = 240
- }
- if !ctx.GlobalIsSet(RecoveryNetworkRPCFlag.Name) {
- cfg.RecoveryNetworkRPC = defaultRecoveryNetworkRPC
- }
- cfg.Genesis = core.DefaultYilanGenesisBlock()
case ctx.GlobalBool(DeveloperFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337
@@ -1467,10 +1425,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
switch {
case ctx.GlobalBool(TestnetFlag.Name):
genesis = core.DefaultTestnetGenesisBlock()
- case ctx.GlobalBool(TaipeiFlag.Name):
- genesis = core.DefaultTaipeiGenesisBlock()
- case ctx.GlobalBool(YilanFlag.Name):
- genesis = core.DefaultYilanGenesisBlock()
case ctx.GlobalBool(DeveloperFlag.Name):
Fatalf("Developer chains are ephemeral")
}