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:
co-authored by
Federico Kunze
Marko
Amaury
parent
c94e9eb1bb
commit
be4a965599
@@ -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, "", " ")
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user