+1
-1
@@ -24,7 +24,7 @@ const (
|
||||
)
|
||||
|
||||
// ExportCmd dumps app state to JSON.
|
||||
func ExportCmd(ctx *Context, cdc *codec.Codec, appExporter AppExporter) *cobra.Command {
|
||||
func ExportCmd(ctx *Context, cdc codec.JSONMarshaler, appExporter AppExporter) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "export",
|
||||
Short: "Export state to JSON",
|
||||
|
||||
+2
-2
@@ -118,7 +118,7 @@ func interceptLoadConfig() (conf *cfg.Config, err error) {
|
||||
|
||||
// add server commands
|
||||
func AddCommands(
|
||||
ctx *Context, cdc *codec.Codec,
|
||||
ctx *Context, cdc codec.JSONMarshaler,
|
||||
rootCmd *cobra.Command,
|
||||
appCreator AppCreator, appExport AppExporter) {
|
||||
|
||||
@@ -154,7 +154,7 @@ func AddCommands(
|
||||
//
|
||||
// NOTE: The ordering of the keys returned as the resulting JSON message is
|
||||
// non-deterministic, so the client should not rely on key ordering.
|
||||
func InsertKeyJSON(cdc *codec.Codec, baseJSON []byte, key string, value json.RawMessage) ([]byte, error) {
|
||||
func InsertKeyJSON(cdc codec.JSONMarshaler, baseJSON []byte, key string, value json.RawMessage) ([]byte, error) {
|
||||
var jsonMap map[string]json.RawMessage
|
||||
|
||||
if err := cdc.UnmarshalJSON(baseJSON, &jsonMap); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user