address review
This commit is contained in:
parent
9b7c506de0
commit
574b684396
@ -2,7 +2,7 @@ package api
|
|||||||
|
|
||||||
import apitypes "github.com/filecoin-project/lotus/api/types"
|
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
|
// TODO: maybe use reflect to automatically register all the eth aliases
|
||||||
as.AliasMethod("eth_accounts", "Filecoin.EthAccounts")
|
as.AliasMethod("eth_accounts", "Filecoin.EthAccounts")
|
||||||
as.AliasMethod("eth_blockNumber", "Filecoin.EthBlockNumber")
|
as.AliasMethod("eth_blockNumber", "Filecoin.EthBlockNumber")
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -38,7 +38,7 @@ func Handler(gwapi lapi.Gateway, api lapi.FullNode, rateLimit int64, connPerMinu
|
|||||||
rpcServer.Register("Filecoin", hnd)
|
rpcServer.Register("Filecoin", hnd)
|
||||||
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
||||||
|
|
||||||
lapi.CrateEthRPCAliases(rpcServer)
|
lapi.CreateEthRPCAliases(rpcServer)
|
||||||
|
|
||||||
m.Handle(path, rpcServer)
|
m.Handle(path, rpcServer)
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server
|
|||||||
rpcServer.Register("Filecoin", hnd)
|
rpcServer.Register("Filecoin", hnd)
|
||||||
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
||||||
|
|
||||||
api.CrateEthRPCAliases(rpcServer)
|
api.CreateEthRPCAliases(rpcServer)
|
||||||
|
|
||||||
var handler http.Handler = rpcServer
|
var handler http.Handler = rpcServer
|
||||||
if permissioned {
|
if permissioned {
|
||||||
|
Loading…
Reference in New Issue
Block a user