Skip to content

Commit

Permalink
remove pre set for side chain
Browse files Browse the repository at this point in the history
  • Loading branch information
TATAUFO committed Jul 9, 2019
1 parent 052ae76 commit b72f4ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
4 changes: 1 addition & 3 deletions cmd/gttc/consolecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ func remoteConsole(ctx *cli.Context) error {
path = ctx.GlobalString(utils.DataDirFlag.Name)
}
if path != "" {
if ctx.GlobalBool(utils.SCAEnableFlag.Name) {
path = filepath.Join(path, "sidechain")
} else if ctx.GlobalBool(utils.TestnetFlag.Name) {
if ctx.GlobalBool(utils.TestnetFlag.Name) {
path = filepath.Join(path, "testnet")
} else if ctx.GlobalBool(utils.RinkebyFlag.Name) {
path = filepath.Join(path, "rinkeby")
Expand Down
13 changes: 0 additions & 13 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,6 @@ var (
// the a subdirectory of the specified datadir will be used.
func MakeDataDir(ctx *cli.Context) string {
if path := ctx.GlobalString(DataDirFlag.Name); path != "" {
if ctx.GlobalBool(SCAEnableFlag.Name) {
return filepath.Join(path, "sidechain")
}
if ctx.GlobalBool(TestnetFlag.Name) {
return filepath.Join(path, "testnet")
}
Expand Down Expand Up @@ -620,8 +617,6 @@ func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) {
func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls := params.MainnetBootnodes
switch {
case ctx.GlobalBool(SCAEnableFlag.Name):
urls = params.SidechainBootnodes
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV4Flag.Name):
if ctx.GlobalIsSet(BootnodesV4Flag.Name) {
urls = strings.Split(ctx.GlobalString(BootnodesV4Flag.Name), ",")
Expand Down Expand Up @@ -914,8 +909,6 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
cfg.DataDir = ctx.GlobalString(DataDirFlag.Name)
case ctx.GlobalBool(DeveloperFlag.Name):
cfg.DataDir = "" // unless explicitly requested, use memory databases
case ctx.GlobalBool(SCAEnableFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "sidechain")
case ctx.GlobalBool(TestnetFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet")
case ctx.GlobalBool(RinkebyFlag.Name):
Expand Down Expand Up @@ -1111,12 +1104,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {

// Override any default configs for hard coded networks.
switch {
case ctx.GlobalBool(SCAEnableFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 8123
}
cfg.SyncMode = downloader.FullSync
cfg.Genesis = core.DefaultSCGenesisBlock()
case ctx.GlobalBool(TestnetFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 8341
Expand Down

0 comments on commit b72f4ed

Please sign in to comment.