Skip to content

Commit

Permalink
attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Dec 19, 2024
1 parent b0cbb9c commit a1c45da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/snapshot/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
)
Expand All @@ -15,7 +16,6 @@ func ExportSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCrea
Short: "Export app state to snapshot store",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
cfg := client.GetConfigFromCmd(cmd)
viper := client.GetViperFromCmd(cmd)
logger := client.GetLoggerFromCmd(cmd)

Expand All @@ -24,7 +24,7 @@ func ExportSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCrea
return err
}

home := cfg.RootDir
home := viper.GetString(flags.FlagHome)
db, err := openDB(home, server.GetAppDBBackend(viper))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions client/snapshot/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
corestore "cosmossdk.io/core/store"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
)
Expand All @@ -22,7 +23,6 @@ func RestoreSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCre
Long: "Restore app state from local snapshot",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
cfg := client.GetConfigFromCmd(cmd)
viper := client.GetViperFromCmd(cmd)
logger := client.GetLoggerFromCmd(cmd)

Expand All @@ -35,7 +35,7 @@ func RestoreSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCre
return err
}

home := cfg.RootDir
home := viper.GetString(flags.FlagHome)
db, err := openDB(home, server.GetAppDBBackend(viper))
if err != nil {
return err
Expand Down

0 comments on commit a1c45da

Please sign in to comment.