Enable proto JSON generally and remove HybridCodec (#6859)

* Remove HybridCodec

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* Test fixes

* Delete hybrid_codec.go

* Fixes

* Fixes

* Fixes

* Test fixes

* Test fixes

* Test fixes

* Lint

* Sim fixes

* Sim fixes

* Revert

* Remove vesting account JSON tests

* Update CHANGELOG.md

* Lint

* Sim fixes

* Sim fixes

* Docs

* Migrate more amino usages

* Remove custom VoteOption String() and json marshaling

* Fix tests

* Add comments, update CHANGELOG.md

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
Aaron Craelius
2020-08-13 13:20:02 +00:00
committed by GitHub
co-authored by Jonathan Gimeno Alexander Bezobchuk
parent 134e1dcecd
commit 816c5a37bd
77 changed files with 325 additions and 845 deletions
+7 -3
View File
@@ -106,7 +106,8 @@ which accepts a path for the resulting pprof file.
serverCtx.Logger.Info("starting ABCI with Tendermint")
err := startInProcess(serverCtx, clientCtx.JSONMarshaler, appCreator)
// amino is needed here for backwards compatibility of REST routes
err := startInProcess(serverCtx, clientCtx.LegacyAmino, appCreator)
return err
},
}
@@ -177,7 +178,8 @@ func startStandAlone(ctx *Context, appCreator types.AppCreator) error {
select {}
}
func startInProcess(ctx *Context, cdc codec.JSONMarshaler, appCreator types.AppCreator) error {
// legacyAminoCdc is used for the legacy REST API
func startInProcess(ctx *Context, legacyAminoCdc *codec.LegacyAmino, appCreator types.AppCreator) error {
cfg := ctx.Config
home := cfg.RootDir
@@ -230,7 +232,9 @@ func startInProcess(ctx *Context, cdc codec.JSONMarshaler, appCreator types.AppC
clientCtx := client.Context{}.
WithHomeDir(home).
WithChainID(genDoc.ChainID).
WithJSONMarshaler(cdc).
WithJSONMarshaler(legacyAminoCdc).
// amino is needed here for backwards compatibility of REST routes
WithLegacyAmino(legacyAminoCdc).
WithClient(local.New(tmNode))
apiSrv = api.New(clientCtx, ctx.Logger.With("module", "api-server"))