From c25b3b9c44e8088a1bc55e3c16165501883683cd Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk Date: Mon, 17 Aug 2020 11:23:37 -0400 Subject: [PATCH] testnet: fix initGenFiles (#7072) --- simapp/simd/cmd/testnet.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 8e94969b3..c90d84c30 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -21,7 +21,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" @@ -288,16 +287,16 @@ func initGenFiles( } authGenState.Accounts = accounts - appGenState[authtypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(authGenState) + appGenState[authtypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&authGenState) // set the balances in the genesis state var bankGenState banktypes.GenesisState clientCtx.JSONMarshaler.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState) bankGenState.Balances = genBalances - appGenState[banktypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(bankGenState) + appGenState[banktypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&bankGenState) - appGenStateJSON, err := codec.MarshalJSONIndent(clientCtx.JSONMarshaler, appGenState) + appGenStateJSON, err := json.MarshalIndent(appGenState, "", " ") if err != nil { return err }