address review

This commit is contained in:
Łukasz Magiera 2023-01-13 20:08:35 +01:00
parent 9b7c506de0
commit 574b684396
5 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ package api
import apitypes "github.com/filecoin-project/lotus/api/types"
func CrateEthRPCAliases(as apitypes.Aliaser) {
func CreateEthRPCAliases(as apitypes.Aliaser) {
// TODO: maybe use reflect to automatically register all the eth aliases
as.AliasMethod("eth_accounts", "Filecoin.EthAccounts")
as.AliasMethod("eth_blockNumber", "Filecoin.EthBlockNumber")

Binary file not shown.

Binary file not shown.

View File

@ -38,7 +38,7 @@ func Handler(gwapi lapi.Gateway, api lapi.FullNode, rateLimit int64, connPerMinu
rpcServer.Register("Filecoin", hnd)
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
lapi.CrateEthRPCAliases(rpcServer)
lapi.CreateEthRPCAliases(rpcServer)
m.Handle(path, rpcServer)
}

View File

@ -79,7 +79,7 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server
rpcServer.Register("Filecoin", hnd)
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
api.CrateEthRPCAliases(rpcServer)
api.CreateEthRPCAliases(rpcServer)
var handler http.Handler = rpcServer
if permissioned {