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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user