fix(stf): fixes to make init genesis pass (#21088)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
This commit is contained in:
co-authored by
marbar3778
parent
2e0884564f
commit
b05bb2601e
@@ -128,8 +128,10 @@ func (a *AppBuilder[T]) Build(opts ...AppBuilderOption[T]) (*App[T], error) {
|
||||
home := v.GetString(FlagHome)
|
||||
|
||||
storeOpts := rootstore.DefaultStoreOptions()
|
||||
if err := v.Sub("store.options").Unmarshal(&storeOpts); err != nil {
|
||||
return nil, fmt.Errorf("failed to store options: %w", err)
|
||||
if s := v.Sub("store.options"); s != nil {
|
||||
if err := s.Unmarshal(&storeOpts); err != nil {
|
||||
return nil, fmt.Errorf("failed to store options: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
scRawDb, err := db.NewDB(db.DBType(v.GetString("store.app-db-backend")), "application", filepath.Join(home, "data"), nil)
|
||||
|
||||
@@ -166,7 +166,7 @@ func (m *MM[T]) InitGenesisJSON(
|
||||
case appmodulev2.HasGenesis:
|
||||
m.logger.Debug("running initialization for module", "module", moduleName)
|
||||
if err := module.InitGenesis(ctx, genesisData[moduleName]); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("init module %s: %w", moduleName, err)
|
||||
}
|
||||
case appmodulev2.HasABCIGenesis:
|
||||
m.logger.Debug("running initialization for module", "module", moduleName)
|
||||
|
||||
Reference in New Issue
Block a user