Skip to content

Commit

Permalink
fix: dumpgenesis for wemix (#140)
Browse files Browse the repository at this point in the history
* fix: dumpgenesis for wemix

* fix: remove useless parameters
  • Loading branch information
egonspace authored Dec 12, 2024
1 parent 255a595 commit a04e139
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func initGenesis(ctx *cli.Context) error {

func dumpGenesis(ctx *cli.Context) error {
// TODO(rjl493456442) support loading from the custom datadir
utils.SetWemixConfig(ctx)
genesis := utils.MakeGenesis(ctx)
if genesis == nil {
genesis = core.DefaultGenesisBlock()
Expand Down
2 changes: 1 addition & 1 deletion cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
utils.Fatalf("Failed to set account manager backends: %v", err)
}

utils.SetWemixConfig(ctx, stack, &cfg.Eth)
utils.SetWemixConfig(ctx)
utils.SetEthConfig(ctx, stack, &cfg.Eth)
if ctx.GlobalIsSet(utils.EthStatsURLFlag.Name) {
cfg.Ethstats.URL = ctx.GlobalString(utils.EthStatsURLFlag.Name)
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ func SetDNSDiscoveryDefaults(cfg *ethconfig.Config, genesis common.Hash) {
}

// SetWemixConfig applies wemix related command line flags to the config.
func SetWemixConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
func SetWemixConfig(ctx *cli.Context) {
if ctx.GlobalIsSet(ConsensusMethodFlag.Name) {
params.ConsensusMethod = ctx.GlobalInt(ConsensusMethodFlag.Name)
} else {
Expand Down

0 comments on commit a04e139

Please sign in to comment.