lotus-provider: fix RPC construction for real

This commit is contained in:
Łukasz Magiera 2023-12-04 14:12:02 +01:00
parent ae67cbdb4d
commit d518b8c5ed

View File

@ -26,9 +26,9 @@ func LotusProviderHandler(
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder() readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
rpcServer := jsonrpc.NewServer(jsonrpc.WithServerErrors(api.RPCErrors), readerServerOpt) rpcServer := jsonrpc.NewServer(jsonrpc.WithServerErrors(api.RPCErrors), readerServerOpt)
wapi := proxy.MetricedAPI[api.LotusProvider, api.LotusProviderStruct](a) wapi := proxy.MetricedAPI[api.LotusProvider, *api.LotusProviderStruct](a)
if permissioned { if permissioned {
wapi = api.PermissionedAPI[api.LotusProvider, api.LotusProviderStruct](wapi) wapi = api.PermissionedAPI[api.LotusProvider, *api.LotusProviderStruct](wapi)
} }
rpcServer.Register("Filecoin", wapi) rpcServer.Register("Filecoin", wapi)