Rename *codec.Codec to *codec.LegacyAmino (#6991)

* Rename *codec.Codec to *codec.LegacyAmino

* Implement requested changes

Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
dauTT
2020-08-10 19:41:21 +00:00
committed by GitHub
co-authored by Aaron Craelius
parent 769387b754
commit 20c80cfd44
148 changed files with 422 additions and 422 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ import (
// AppModuleBasic is the standard form for basic non-dependant elements of an application module.
type AppModuleBasic interface {
Name() string
RegisterCodec(*codec.Codec)
RegisterCodec(*codec.LegacyAmino)
RegisterInterfaces(codectypes.InterfaceRegistry)
DefaultGenesis(codec.JSONMarshaler) json.RawMessage
@@ -73,7 +73,7 @@ func NewBasicManager(modules ...AppModuleBasic) BasicManager {
}
// RegisterCodec registers all module codecs
func (bm BasicManager) RegisterCodec(cdc *codec.Codec) {
func (bm BasicManager) RegisterCodec(cdc *codec.LegacyAmino) {
for _, b := range bm {
b.RegisterCodec(cdc)
}
+1 -1
View File
@@ -28,7 +28,7 @@ func TestBasicManager(t *testing.T) {
cdc := codec.New()
interfaceRegistry := types.NewInterfaceRegistry()
clientCtx := client.Context{}
clientCtx = clientCtx.WithCodec(cdc)
clientCtx = clientCtx.WithLegacyAmino(cdc)
wantDefaultGenesis := map[string]json.RawMessage{"mockAppModuleBasic1": json.RawMessage(``)}
mockAppModuleBasic1 := mocks.NewMockAppModuleBasic(mockCtrl)
+1 -1
View File
@@ -99,7 +99,7 @@ func (sm *SimulationManager) WeightedOperations(simState SimulationState) []simu
// GenesisState generator function
type SimulationState struct {
AppParams simulation.AppParams
Cdc *codec.Codec // application codec
Cdc *codec.LegacyAmino // application codec
Rand *rand.Rand // random number
GenState map[string]json.RawMessage // genesis state
Accounts []simulation.Account // simulation accounts