aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/server.go5
-rw-r--r--rpc/utils.go2
2 files changed, 4 insertions, 3 deletions
diff --git a/rpc/server.go b/rpc/server.go
index 001107a1b..69f3271e8 100644
--- a/rpc/server.go
+++ b/rpc/server.go
@@ -34,7 +34,8 @@ const (
notificationBufferSize = 10000 // max buffered notifications before codec is closed
- DefaultIPCApis = "admin,eth,debug,miner,net,shh,txpool,personal,web3"
+ MetadataApi = "rpc"
+ DefaultIPCApis = "admin,debug,eth,miner,net,personal,shh,txpool,web3"
DefaultHTTPApis = "eth,net,web3"
)
@@ -61,7 +62,7 @@ func NewServer() *Server {
// register a default service which will provide meta information about the RPC service such as the services and
// methods it offers.
rpcService := &RPCService{server}
- server.RegisterName("rpc", rpcService)
+ server.RegisterName(MetadataApi, rpcService)
return server
}
diff --git a/rpc/utils.go b/rpc/utils.go
index 86938e9b3..fe482e19d 100644
--- a/rpc/utils.go
+++ b/rpc/utils.go
@@ -234,7 +234,7 @@ func SupportedModules(client Client) (map[string]string, error) {
req := JSONRequest{
Id: []byte("1"),
Version: "2.0",
- Method: "rpc_modules",
+ Method: MetadataApi + "_modules",
}
if err := client.Send(req); err != nil {
return nil, err