diff --git a/cmd/rpc.go b/cmd/rpc.go index e5cf2be..d6f80db 100644 --- a/cmd/rpc.go +++ b/cmd/rpc.go @@ -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) diff --git a/integration_test/builder.go b/integration_test/builder.go index 86473cd..48a5f09 100644 --- a/integration_test/builder.go +++ b/integration_test/builder.go @@ -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 {