codec: Rename codec and marshaler interfaces (#9226)

* codec: Rename codec and marshaler interfaces, ref: 8413

* codec: remove BinaryBare

* changelog update

* Update comments and documentation

* adding doc string comments

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update codec/codec.go

Co-authored-by: Marko <marbar3778@yahoo.com>

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Robert Zaremba
2021-04-29 10:46:22 +00:00
committed by GitHub
co-authored by Federico Kunze Marko Amaury
parent c94e9eb1bb
commit be4a965599
162 changed files with 824 additions and 621 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ func createConfigFolder(dir string) error {
return os.Mkdir(path.Join(dir, "config"), 0700)
}
func newDefaultGenesisDoc(cdc codec.Marshaler) *tmtypes.GenesisDoc {
func newDefaultGenesisDoc(cdc codec.Codec) *tmtypes.GenesisDoc {
genesisState := simapp.NewDefaultGenesisState(cdc)
stateBytes, err := json.MarshalIndent(genesisState, "", " ")
+2 -2
View File
@@ -72,7 +72,7 @@ func (s *GRPCWebTestSuite) Test_Latest_Validators() {
s.assertTrailerGrpcCode(trailers, codes.OK, "")
s.assertContentTypeSet(headers, contentType)
var valsSet tmservice.GetLatestValidatorSetResponse
err = s.protoCdc.UnmarshalBinaryBare(responses[0], &valsSet)
err = s.protoCdc.Unmarshal(responses[0], &valsSet)
s.Require().NoError(err)
pubKey, ok := valsSet.Validators[0].PubKey.GetCachedValue().(cryptotypes.PubKey)
s.Require().Equal(true, ok)
@@ -92,7 +92,7 @@ func (s *GRPCWebTestSuite) Test_Total_Supply() {
s.assertTrailerGrpcCode(trailers, codes.OK, "")
s.assertContentTypeSet(headers, contentType)
var totalSupply banktypes.QueryTotalSupplyResponse
_ = s.protoCdc.UnmarshalBinaryBare(responses[0], &totalSupply)
_ = s.protoCdc.Unmarshal(responses[0], &totalSupply)
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ import (
// RosettaCommand builds the rosetta root command given
// a protocol buffers serializer/deserializer
func RosettaCommand(ir codectypes.InterfaceRegistry, cdc codec.Marshaler) *cobra.Command {
func RosettaCommand(ir codectypes.InterfaceRegistry, cdc codec.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "rosetta",
Short: "spin up a rosetta server",