Skip to content

Commit

Permalink
main: add rpc.Discover to openrpc document
Browse files Browse the repository at this point in the history
Signed-off-by: meows <b5c6@protonmail.com>
  • Loading branch information
meowsbits committed Oct 27, 2020
1 parent 9805c16 commit 116898e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/lotus/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ func serveRPC(a api.FullNode, stop node.StopFunc, addr multiaddr.Multiaddr, shut
fullAPI := apistruct.PermissionedFullAPI(metrics.MetricedFullAPI(a))
rpcServer.Register("Filecoin", fullAPI)

doc := newOpenRPCDocument()

doc := openrpc.NewLotusOpenRPCDocument()
discovery := &RPCDiscovery{doc}
doc.RegisterReceiverName("Filecoin", fullAPI)

rpcServer.Register("rpc", &RPCDiscovery{doc})
doc.RegisterReceiverName("rpc", discovery)
rpcServer.Register("rpc", discovery)

ah := &auth.Handler{
Verify: a.AuthVerify,
Expand Down

0 comments on commit 116898e

Please sign in to comment.