diff --git a/cmd/lotus-worker/sealworker/rpc.go b/cmd/lotus-worker/sealworker/rpc.go index f7e5ca90f41..91f96d9a80b 100644 --- a/cmd/lotus-worker/sealworker/rpc.go +++ b/cmd/lotus-worker/sealworker/rpc.go @@ -34,6 +34,7 @@ func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permiss } rpcServer.Register("Filecoin", wapi) + rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover") mux.Handle("/rpc/v0", rpcServer) mux.Handle("/rpc/streams/v0/push/{uuid}", readerHandler) diff --git a/gateway/handler.go b/gateway/handler.go index f8da5a5e137..d60d3003a16 100644 --- a/gateway/handler.go +++ b/gateway/handler.go @@ -20,6 +20,8 @@ func Handler(a api.Gateway, opts ...jsonrpc.ServerOption) (http.Handler, error) serveRpc := func(path string, hnd interface{}) { rpcServer := jsonrpc.NewServer(opts...) rpcServer.Register("Filecoin", hnd) + rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover") + m.Handle(path, rpcServer) } diff --git a/node/rpc.go b/node/rpc.go index 6a3e5511560..a160fed1900 100644 --- a/node/rpc.go +++ b/node/rpc.go @@ -71,6 +71,7 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server serveRpc := func(path string, hnd interface{}) { rpcServer := jsonrpc.NewServer(opts...) rpcServer.Register("Filecoin", hnd) + rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover") var handler http.Handler = rpcServer if permissioned { @@ -131,6 +132,7 @@ func MinerHandler(a api.StorageMiner, permissioned bool) (http.Handler, error) { readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder() rpcServer := jsonrpc.NewServer(readerServerOpt) rpcServer.Register("Filecoin", mapi) + rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover") m.Handle("/rpc/v0", rpcServer) m.Handle("/rpc/streams/v0/push/{uuid}", readerHandler)