Skip to content

Commit

Permalink
fix: testutil/configurator: correctly create fresh copy of defaultCon…
Browse files Browse the repository at this point in the history
…fig (#17089)

(cherry picked from commit 0fa85b7)

# Conflicts:
#	testutil/configurator/configurator.go
  • Loading branch information
odeke-em authored and mergify[bot] committed Jul 22, 2023
1 parent 3b509c1 commit 0f3d58d
Showing 1 changed file with 72 additions and 1 deletion.
73 changes: 72 additions & 1 deletion testutil/configurator/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Config struct {
setInitGenesis bool
}

<<<<<<< HEAD
var defaultConfig = &Config{
ModuleConfigs: make(map[string]*appv1alpha1.ModuleConfig),
BeginBlockersOrder: []string{
Expand Down Expand Up @@ -96,6 +97,76 @@ var defaultConfig = &Config{
"vesting",
},
setInitGenesis: true,
=======
func defaultConfig() *Config {
return &Config{
ModuleConfigs: make(map[string]*appv1alpha1.ModuleConfig),
BeginBlockersOrder: []string{
"upgrade",
"mint",
"distribution",
"slashing",
"evidence",
"staking",
"auth",
"bank",
"gov",
"crisis",
"genutil",
"authz",
"feegrant",
"nft",
"group",
"params",
"consensus",
"vesting",
"circuit",
},
EndBlockersOrder: []string{
"crisis",
"gov",
"staking",
"auth",
"bank",
"distribution",
"slashing",
"mint",
"genutil",
"evidence",
"authz",
"feegrant",
"nft",
"group",
"params",
"consensus",
"upgrade",
"vesting",
"circuit",
},
InitGenesisOrder: []string{
"auth",
"bank",
"distribution",
"staking",
"slashing",
"gov",
"mint",
"crisis",
"genutil",
"evidence",
"authz",
"feegrant",
"nft",
"group",
"params",
"consensus",
"upgrade",
"vesting",
"circuit",
},
setInitGenesis: true,
}
>>>>>>> 0fa85b7a4 (fix: testutil/configurator: correctly create fresh copy of defaultConfig (#17089))
}

type ModuleOption func(config *Config)
Expand Down Expand Up @@ -295,7 +366,7 @@ func OmitInitGenesis() ModuleOption {
}

func NewAppConfig(opts ...ModuleOption) depinject.Config {
cfg := defaultConfig
cfg := defaultConfig()
for _, opt := range opts {
opt(cfg)
}
Expand Down

0 comments on commit 0f3d58d

Please sign in to comment.