Skip to content

Commit

Permalink
fix: fix lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
zl03jsj committed Sep 26, 2022
1 parent c5c98d0 commit 6e55a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cmd/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,6 @@ func ServeRPC(a api.IFullAPI, stop build.StopFunc, addr string, sigChan chan os.
return srv.Serve(manet.NetListener(lst))
}

func NewService(a api.IFullAPI, stop build.StopFunc, addr string) (*http.Server, error) {
rpcServer := jsonrpc.NewServer()
rpcServer.Register("Filecoin", permissionedFullAPI(a))
ah := &Handler{
Verify: a.AuthVerify,
Next: rpcServer.ServeHTTP,
}
http.Handle("/rpc/v0", CorsMiddleWare(ah))
return &http.Server{Handler: http.DefaultServeMux}, nil
}

func permissionedFullAPI(a api.IFullAPI) api.IFullAPI {
var out shared.IFullAPIStruct
permission.PermissionProxy(a, &out)
Expand Down
3 changes: 3 additions & 0 deletions integration_test/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func (inst *WalletInst) Start() (string, error) {
stats.Record(ctx, middleware.VenusInfo.M(1))

endPoint, err := inst.repo.APIEndpoint()
if err != nil {
return "", fmt.Errorf("get api endpoint failed:%w", err)
}

ma, err := multiaddr.NewMultiaddr(endPoint)
if err != nil {
Expand Down

0 comments on commit 6e55a6d

Please sign in to comment.