Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Mar 11, 2024
1 parent 0298640 commit b001117
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions cmd/ethermintd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) {
// sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode
// is only available if the client is online.
if !initClientCtx.Offline {
enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL)
txConfigOpts := tx.ConfigOptions{
EnabledSignModes: enabledSignModes,
EnabledSignModes: append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL),
TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx),
}
txConfig, err := tx.NewTxConfigWithOptions(
Expand Down
1 change: 0 additions & 1 deletion rpc/stream/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ var (
tmtypes.EventTx,
sdk.EventTypeMessage,
sdk.AttributeKeyModule, evmtypes.ModuleName)).String()
headerEvents = tmtypes.QueryForEvent(tmtypes.EventNewBlockHeader).String()
blockEvents = tmtypes.QueryForEvent(tmtypes.EventNewBlock).String()
evmTxHashKey = fmt.Sprintf("%s.%s", evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyEthereumTxHash)
)
Expand Down
15 changes: 5 additions & 10 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,7 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start
defer grpcSrv.GracefulStop()
}

apiSrv, err := startAPIServer(ctx, svrCtx, clientCtx, g, config.Config, app, grpcSrv, metrics)
if err != nil {
return err
}
apiSrv := startAPIServer(ctx, svrCtx, clientCtx, g, config.Config, app, grpcSrv, metrics)
if apiSrv != nil {
defer apiSrv.Close()
}
Expand Down Expand Up @@ -630,9 +627,9 @@ func startAPIServer(
app types.Application,
grpcSrv *grpc.Server,
metrics *telemetry.Metrics,
) (*api.Server, error) {
) *api.Server {
if !svrCfg.API.Enable {
return nil, nil
return nil
}

apiSrv := api.New(clientCtx, svrCtx.Logger.With("server", "api"), grpcSrv)
Expand All @@ -645,7 +642,7 @@ func startAPIServer(
g.Go(func() error {
return apiSrv.Start(ctx, svrCfg)
})
return apiSrv, nil
return apiSrv
}

func startJSONRPCServer(
Expand Down Expand Up @@ -718,9 +715,7 @@ func startRosettaServer(
return err
}

g.Go(func() error {
return rosettaSrv.Start()
})
g.Go(rosettaSrv.Start)
return nil
}

Expand Down

0 comments on commit b001117

Please sign in to comment.