feat: migrate x/crisis use app wiring (#12389)
Co-authored-by: JeancarloBarrios <jeancarlobarrios@users.noreply.github.com>
This commit is contained in:
co-authored by
JeancarloBarrios
parent
17dc431666
commit
77cf43009a
@@ -63,7 +63,7 @@ type AppConstructor = func(val Validator) servertypes.Application
|
||||
func NewAppConstructor(encodingCfg params.EncodingConfig) AppConstructor {
|
||||
return func(val Validator) servertypes.Application {
|
||||
return simapp.NewSimApp(
|
||||
val.Ctx.Logger, dbm.NewMemDB(), nil, true, 0,
|
||||
val.Ctx.Logger, dbm.NewMemDB(), nil, true,
|
||||
encodingCfg,
|
||||
simtestutil.NewAppOptionsWithFlagHome(val.Ctx.Config.RootDir),
|
||||
baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.AppConfig.Pruning)),
|
||||
|
||||
@@ -245,7 +245,12 @@ func (ao EmptyAppOptions) Get(o string) interface{} {
|
||||
type AppOptionsMap map[string]interface{}
|
||||
|
||||
func (m AppOptionsMap) Get(key string) interface{} {
|
||||
return m[key]
|
||||
v, ok := m[key]
|
||||
if !ok {
|
||||
return interface{}(nil)
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
func NewAppOptionsWithFlagHome(homePath string) servertypes.AppOptions {
|
||||
|
||||
Reference in New Issue
Block a user