Skip to content

Commit

Permalink
modify flags set
Browse files Browse the repository at this point in the history
  • Loading branch information
ttblack authored and ttblack committed Oct 29, 2021
1 parent 25046b5 commit fda99c5
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1583,9 +1583,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if !ctx.GlobalIsSet(DataDirFlag.Name) {
cfg.EvilSignersJournalDir = filepath.Join(node.DefaultDataDir(), "testnet", "geth")
}
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(1)
cfg.DocArraySortHeight = new(big.Int).SetUint64(2080000)

if !ctx.GlobalIsSet(OldDIDMigrateAddrFlag.Name) {
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(1)
}
if !ctx.GlobalIsSet(DocArraySortHeightFlag.Name) {
cfg.DocArraySortHeight = new(big.Int).SetUint64(2080000)
}
case ctx.GlobalBool(RinkebyFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 24
Expand All @@ -1595,8 +1598,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if !ctx.GlobalIsSet(DataDirFlag.Name) {
cfg.EvilSignersJournalDir = filepath.Join(node.DefaultDataDir(), "rinkeby", "geth")
}
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(0)
cfg.DocArraySortHeight = new(big.Int).SetUint64(340000)
if !ctx.GlobalIsSet(OldDIDMigrateAddrFlag.Name) {
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(0)
}
if !ctx.GlobalIsSet(DocArraySortHeightFlag.Name) {
cfg.DocArraySortHeight = new(big.Int).SetUint64(340000)
}
case ctx.GlobalBool(GoerliFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 25
Expand All @@ -1606,8 +1613,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if !ctx.GlobalIsSet(DataDirFlag.Name) {
cfg.EvilSignersJournalDir = filepath.Join(node.DefaultDataDir(), "goerli", "geth")
}
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(0)
//cfg.DocArraySortHeight = new(big.Int).SetUint64(0)
if !ctx.GlobalIsSet(OldDIDMigrateAddrFlag.Name) {
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(0)
}
if !ctx.GlobalIsSet(DocArraySortHeightFlag.Name) {
cfg.DocArraySortHeight = new(big.Int).SetUint64(0)
}
case ctx.GlobalBool(DeveloperFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337
Expand All @@ -1634,8 +1645,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if !ctx.GlobalIsSet(MinerGasPriceFlag.Name) && !ctx.GlobalIsSet(MinerLegacyGasPriceFlag.Name) {
cfg.Miner.GasPrice = big.NewInt(1)
}
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(0)
//cfg.DocArraySortHeight = new(big.Int).SetUint64(0)
if !ctx.GlobalIsSet(OldDIDMigrateAddrFlag.Name) {
cfg.OldDIDMigrateHeight = new(big.Int).SetUint64(0)
}
if !ctx.GlobalIsSet(DocArraySortHeightFlag.Name) {
cfg.DocArraySortHeight = new(big.Int).SetUint64(0)
}
}
}

Expand Down

0 comments on commit fda99c5

Please sign in to comment.