Skip to content

Commit

Permalink
simapp InitChainer: use json instead of tmjson (cosmos#7523)
Browse files Browse the repository at this point in the history
* simapp InitChainer: use json instead of tmjson

* First run for test

* Revert export_test

Co-authored-by: Alessio Treglia <[email protected]>
  • Loading branch information
amaury1093 and Alessio Treglia authored Feb 24, 2021
1 parent 7969135 commit 2539acd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simapp/app.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package simapp

import (
"encoding/json"
"io"
"net/http"
"os"
Expand All @@ -10,7 +11,6 @@ import (
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
tmjson "github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
Expand Down Expand Up @@ -484,7 +484,7 @@ func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.Re
// InitChainer application update at chain initialization
func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain {
var genesisState GenesisState
if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
Expand Down

0 comments on commit 2539acd

Please sign in to comment.