From 31b4c2e26b07b8dcabdc7c41f098a1f08afe2dee Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:43:55 +0000 Subject: [PATCH] docs(x/genutil): audit genutil (backport #21471) (#21476) Co-authored-by: Julien Robert --- x/genutil/client/cli/commands.go | 2 -- x/genutil/v2/cli/commands.go | 2 +- x/genutil/v2/doc.go | 5 +++++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 x/genutil/v2/doc.go diff --git a/x/genutil/client/cli/commands.go b/x/genutil/client/cli/commands.go index 4793db294e..6e1415fe07 100644 --- a/x/genutil/client/cli/commands.go +++ b/x/genutil/client/cli/commands.go @@ -13,8 +13,6 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) -// TODO(serverv2): remove app exporter notion that is server v1 specific - type genesisMM interface { DefaultGenesis() map[string]json.RawMessage ValidateGenesis(genesisData map[string]json.RawMessage) error diff --git a/x/genutil/v2/cli/commands.go b/x/genutil/v2/cli/commands.go index 93052d1e49..515bf329a5 100644 --- a/x/genutil/v2/cli/commands.go +++ b/x/genutil/v2/cli/commands.go @@ -21,7 +21,7 @@ type genesisMM interface { // Commands adds core sdk's sub-commands into genesis command. func Commands(genutilModule genutil.AppModule, genMM genesisMM, appExport v2.AppExporter) *cobra.Command { - return CommandsWithCustomMigrationMap(genutilModule, genMM, appExport, genutiltypes.MigrationMap{}) + return CommandsWithCustomMigrationMap(genutilModule, genMM, appExport, cli.MigrationMap) } // CommandsWithCustomMigrationMap adds core sdk's sub-commands into genesis command with custom migration map. diff --git a/x/genutil/v2/doc.go b/x/genutil/v2/doc.go new file mode 100644 index 0000000000..217158d639 --- /dev/null +++ b/x/genutil/v2/doc.go @@ -0,0 +1,5 @@ +// v2 contains logic and CLI used for genutil by server/v2 / runtime/v2 applications. +// It contains the AppExporter struct which is used when exporting the application state. +// Additionnaly it holds the a custom Export command specific to the v2 application. +// The rest of the CLI commands are the same as the ones in the genutil module. +package v2