Skip to content

Commit cff2d11

Browse files
tac0turtlepthmas
authored andcommitted
add snapshot cmd
1 parent 8d956e2 commit cff2d11

File tree

1 file changed

+6
-2
lines changed
  • protocol/cmd/dydxprotocold/cmd

1 file changed

+6
-2
lines changed

protocol/cmd/dydxprotocold/cmd/root.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/cosmos/cosmos-sdk/client/flags"
2525
"github.com/cosmos/cosmos-sdk/client/keys"
2626
"github.com/cosmos/cosmos-sdk/client/rpc"
27+
"github.com/cosmos/cosmos-sdk/client/snapshot"
2728
"github.com/cosmos/cosmos-sdk/codec/address"
2829
"github.com/cosmos/cosmos-sdk/crypto/keyring"
2930
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
@@ -209,13 +210,16 @@ func initRootCmd(
209210
tmcli.NewCompletionCmd(rootCmd, true),
210211
debug.Cmd(),
211212
confixcmd.ConfigCommand(),
213+
snapshot.Cmd(newApp),
212214
)
213215

214216
server.AddCommands(
215217
rootCmd,
216218
dydxapp.DefaultNodeHome,
217219
func(logger log.Logger, db dbm.DB, writer io.Writer, options servertypes.AppOptions) servertypes.Application {
218-
return appInterceptor(newApp(logger, db, writer, options))
220+
//TODO: cleanup app appInterceptor
221+
app := newApp(logger, db, writer, options)
222+
return appInterceptor(app.(*dydxapp.App))
219223
},
220224
appExport,
221225
func(cmd *cobra.Command) {
@@ -351,7 +355,7 @@ func newApp(
351355
db dbm.DB,
352356
traceStore io.Writer,
353357
appOpts servertypes.AppOptions,
354-
) *dydxapp.App {
358+
) servertypes.Application {
355359
var cache storetypes.MultiStorePersistentCache
356360

357361
if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) {

0 commit comments

Comments
 (0)