Skip to content

Commit

Permalink
move to server and make default
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Jun 26, 2024
1 parent 268af2e commit 39ef821
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package server

import (
"encoding/hex"
Expand All @@ -14,7 +14,6 @@ import (
"cosmossdk.io/store/rootmulti"
storetypes "cosmossdk.io/store/types"

"github.com/cosmos/cosmos-sdk/server"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
)

Expand All @@ -31,7 +30,7 @@ Example:
RunE: func(cmd *cobra.Command, args []string) error {
heightToRetrieveString := args[0]

serverCtx := server.GetServerContextFromCmd(cmd)
serverCtx := GetServerContextFromCmd(cmd)

height, err := strconv.ParseInt(heightToRetrieveString, 10, 64)
if err != nil {
Expand All @@ -53,9 +52,9 @@ Example:
return cmd
}

func getModuleHashesAtHeight[T servertypes.Application](svrCtx *server.Context, appCreator servertypes.AppCreator[T], height int64) (*storetypes.CommitInfo, error) {
func getModuleHashesAtHeight[T servertypes.Application](svrCtx *Context, appCreator servertypes.AppCreator[T], height int64) (*storetypes.CommitInfo, error) {
home := svrCtx.Config.RootDir
db, err := openDB(home, server.GetAppDBBackend(svrCtx.Viper))
db, err := openDB(home, GetAppDBBackend(svrCtx.Viper))
if err != nil {
return nil, fmt.Errorf("error opening DB, make sure osmosisd is not running when calling this query: %w", err)
}
Expand Down
1 change: 1 addition & 0 deletions server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ func AddCommands[T types.Application](rootCmd *cobra.Command, appCreator types.A
cometCmd,
version.NewVersionCommand(),
NewRollbackCmd(appCreator),
ModuleHashByHeightQuery(appCreator),
)
}

Expand Down

0 comments on commit 39ef821

Please sign in to comment.