Move generateApp & exportApp to baseapp/helpers

This commit is contained in:
Christopher Goes
2018-04-27 20:04:29 -04:00
committed by rigelrozanski
parent f6cef02904
commit 10d2e5ae40
11 changed files with 83 additions and 73 deletions
+3 -7
View File
@@ -6,16 +6,12 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/tmlibs/log"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/wire"
)
// AppExporter dumps all app state to JSON-serializable structure
type AppExporter func(home string, log log.Logger) (interface{}, *wire.Codec, error)
// ExportCmd dumps app state to JSON
func ExportCmd(app AppExporter, ctx *Context) *cobra.Command {
func ExportCmd(app baseapp.AppExporter, ctx *Context) *cobra.Command {
export := exportCmd{
appExporter: app,
context: ctx,
@@ -29,7 +25,7 @@ func ExportCmd(app AppExporter, ctx *Context) *cobra.Command {
}
type exportCmd struct {
appExporter AppExporter
appExporter baseapp.AppExporter
context *Context
}