lotus-provider: fix RPC construction for real real
This commit is contained in:
parent
d518b8c5ed
commit
887f0adf89
@ -41,10 +41,10 @@ func PermissionedWorkerAPI(a Worker) Worker {
|
||||
return &out
|
||||
}
|
||||
|
||||
func PermissionedAPI[T, P any](a T) P {
|
||||
func PermissionedAPI[T, P any](a T) *P {
|
||||
var out P
|
||||
permissionedProxies(a, &out)
|
||||
return out
|
||||
return &out
|
||||
}
|
||||
|
||||
func PermissionedWalletAPI(a Wallet) Wallet {
|
||||
|
@ -26,9 +26,9 @@ func LotusProviderHandler(
|
||||
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
|
||||
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 {
|
||||
wapi = api.PermissionedAPI[api.LotusProvider, *api.LotusProviderStruct](wapi)
|
||||
wapi = api.PermissionedAPI[api.LotusProvider, api.LotusProviderStruct](wapi)
|
||||
}
|
||||
|
||||
rpcServer.Register("Filecoin", wapi)
|
||||
|
@ -10,10 +10,10 @@ import (
|
||||
"github.com/filecoin-project/lotus/metrics"
|
||||
)
|
||||
|
||||
func MetricedAPI[T, P any](a T) P {
|
||||
func MetricedAPI[T, P any](a T) *P {
|
||||
var out P
|
||||
proxy(a, &out)
|
||||
return out
|
||||
return &out
|
||||
}
|
||||
|
||||
func MetricedStorMinerAPI(a api.StorageMiner) api.StorageMiner {
|
||||
|
Loading…
Reference in New Issue
Block a user