Enable proto JSON generally and remove HybridCodec (#6859)
* Remove HybridCodec * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * Test fixes * Delete hybrid_codec.go * Fixes * Fixes * Fixes * Test fixes * Test fixes * Test fixes * Lint * Sim fixes * Sim fixes * Revert * Remove vesting account JSON tests * Update CHANGELOG.md * Lint * Sim fixes * Sim fixes * Docs * Migrate more amino usages * Remove custom VoteOption String() and json marshaling * Fix tests * Add comments, update CHANGELOG.md Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
co-authored by
Jonathan Gimeno
Alexander Bezobchuk
parent
134e1dcecd
commit
816c5a37bd
@@ -88,6 +88,6 @@ func RandomizedGenState(simState *module.SimulationState) {
|
||||
|
||||
slashingGenesis := types.NewGenesisState(params, []types.SigningInfo{}, []types.ValidatorMissedBlocks{})
|
||||
|
||||
fmt.Printf("Selected randomly generated slashing parameters:\n%s\n", codec.MustMarshalJSONIndent(simState.Cdc, slashingGenesis.Params))
|
||||
fmt.Printf("Selected randomly generated slashing parameters:\n%s\n", codec.MustMarshalJSONIndent(simState.Cdc, &slashingGenesis.Params))
|
||||
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(slashingGenesis)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ const (
|
||||
|
||||
// WeightedOperations returns all the operations from the module with their respective weights
|
||||
func WeightedOperations(
|
||||
appParams simtypes.AppParams, cdc *codec.LegacyAmino, ak types.AccountKeeper,
|
||||
appParams simtypes.AppParams, cdc codec.JSONMarshaler, ak types.AccountKeeper,
|
||||
bk types.BankKeeper, k keeper.Keeper, sk stakingkeeper.Keeper,
|
||||
) simulation.WeightedOperations {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestWeightedOperations(t *testing.T) {
|
||||
app, ctx := createTestApp(false)
|
||||
ctx.WithChainID("test-chain")
|
||||
|
||||
cdc := app.LegacyAmino()
|
||||
cdc := app.AppCodec()
|
||||
appParams := make(simtypes.AppParams)
|
||||
|
||||
s := rand.NewSource(1)
|
||||
|
||||
Reference in New Issue
Block a user