Skip to content

Commit

Permalink
remove option to export certain modules only
Browse files Browse the repository at this point in the history
  • Loading branch information
randygrok committed Aug 13, 2024
1 parent 6b32d53 commit db542cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runtime/v2/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (a *AppBuilder[T]) Build(opts ...AppBuilderOption[T]) (*App[T], error) {
return nil
},
ExportGenesis: func(ctx context.Context, version uint64) ([]byte, error) {
genesisJson, err := a.app.moduleManager.ExportGenesisForModules(ctx) // TODO: add option to export certain modules?
genesisJson, err := a.app.moduleManager.ExportGenesisForModules(ctx)
if err != nil {
return nil, fmt.Errorf("failed to export genesis: %w", err)
}
Expand Down
6 changes: 2 additions & 4 deletions runtime/v2/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,9 @@ func (m *MM[T]) InitGenesisJSON(
// ExportGenesisForModules performs export genesis functionality for modules
func (m *MM[T]) ExportGenesisForModules(
ctx context.Context,
modulesToExport ...string,
) (map[string]json.RawMessage, error) {
if len(modulesToExport) == 0 {
modulesToExport = m.config.ExportGenesis
}
modulesToExport := m.config.ExportGenesis

// verify modules exists in app, so that we don't panic in the middle of an export
if err := m.checkModulesExists(modulesToExport); err != nil {
return nil, err
Expand Down

0 comments on commit db542cf

Please sign in to comment.