Skip to content

Commit

Permalink
rename RegisterCodec to RegisterLegacyAminoCodec (cosmos#7243)
Browse files Browse the repository at this point in the history
* rename RegisterCodec to RegisterLegacyAminoCodec

* Add changelog

* gofmt

* rename codec.New() to codec.NewLegacyAmino()

* Add change log

* Update CHANGELOG.md

Co-authored-by: Amaury Martiny <[email protected]>

* Fix

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Amaury Martiny <[email protected]>
  • Loading branch information
3 people authored Sep 7, 2020
1 parent 2f7f228 commit eec0c69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
// MakeEncodingConfig creates an EncodingConfig for testing
func MakeEncodingConfig() params.EncodingConfig {
encodingConfig := params.MakeEncodingConfig()
std.RegisterCodec(encodingConfig.Amino)
std.RegisterLegacyAminoCodec(encodingConfig.Amino)
std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
ModuleBasics.RegisterCodec(encodingConfig.Amino)
ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino)
ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry)
return encodingConfig
}
2 changes: 1 addition & 1 deletion params/amino.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
func MakeEncodingConfig() EncodingConfig {
cdc := codec.New()
cdc := codec.NewLegacyAmino()
interfaceRegistry := types.NewInterfaceRegistry()
marshaler := codec.NewAminoCodec(cdc)

Expand Down
2 changes: 1 addition & 1 deletion params/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
func MakeEncodingConfig() EncodingConfig {
amino := codec.New()
amino := codec.NewLegacyAmino()
interfaceRegistry := types.NewInterfaceRegistry()
marshaler := codec.NewProtoCodec(interfaceRegistry)
txCfg := tx.NewTxConfig(marshaler, std.DefaultPublicKeyCodec{}, tx.DefaultSignModes)
Expand Down
6 changes: 3 additions & 3 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
)

func makeCodec(bm module.BasicManager) *codec.LegacyAmino {
cdc := codec.New()
cdc := codec.NewLegacyAmino()

bm.RegisterCodec(cdc)
std.RegisterCodec(cdc)
bm.RegisterLegacyAminoCodec(cdc)
std.RegisterLegacyAminoCodec(cdc)

return cdc
}
Expand Down

0 comments on commit eec0c69

Please sign in to comment.