Skip to content

Commit

Permalink
audit remaining files
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilkumarpilli committed Sep 2, 2024
1 parent b6c0829 commit 310b6af
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion x/slashing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/slashing/proto/cosmo

### Params

The slashing module stores it's params in state with the prefix of `0x00`,
The slashing module stores its params in state with the prefix of `0x00`,
it can be updated with governance or the address with authority.

* Params: `0x00 | ProtocolBuffer(Params)`
Expand Down
8 changes: 4 additions & 4 deletions x/slashing/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,27 @@ func (AppModule) RegisterLegacyAminoCodec(cdc legacy.Amino) {
types.RegisterLegacyAminoCodec(cdc)
}

// RegisterInterfaces registers the module's interface types
// RegisterInterfaces registers the slashing module's interface types
func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) {
types.RegisterInterfaces(registrar)
}

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the slashig module.
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the slashing module.
func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil {
panic(err)
}
}

// RegisterServices registers module services.
// RegisterServices registers slashing module's services.
func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error {
types.RegisterMsgServer(registrar, keeper.NewMsgServerImpl(am.keeper))
types.RegisterQueryServer(registrar, keeper.NewQuerier(am.keeper))

return nil
}

// RegisterMigrations registers module migrations.
// RegisterMigrations registers slashing module's migrations.
func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error {
m := keeper.NewMigrator(am.keeper, am.stakingKeeper.ValidatorAddressCodec())

Expand Down
2 changes: 1 addition & 1 deletion x/slashing/simulation/proposals.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ProposalMsgs() []simtypes.WeightedProposalMsg {
// SimulateMsgUpdateParams returns a random MsgUpdateParams
func SimulateMsgUpdateParams(_ context.Context, r *rand.Rand, _ []simtypes.Account, ac coreaddress.Codec) (sdk.Msg, error) {
// use the default gov module account address as authority
var authority sdk.AccAddress = address.Module("gov")
var authority sdk.AccAddress = address.Module(types.GovModuleName)

authorityAddr, err := ac.BytesToString(authority)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/slashing/simulation/proposals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestProposalMsgs(t *testing.T) {
msgUpdateParams, ok := msg.(*types.MsgUpdateParams)
assert.Assert(t, ok)

moduleAddr, err := ac.BytesToString(address.Module("gov"))
moduleAddr, err := ac.BytesToString(address.Module(types.GovModuleName))
assert.NilError(t, err)

assert.Equal(t, moduleAddr, msgUpdateParams.Authority)
Expand Down

0 comments on commit 310b6af

Please sign in to comment.