We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b24a9 commit c30cf11Copy full SHA for c30cf11
jsonrpc/jsonrpc2.py
@@ -45,6 +45,7 @@ class JSONRPC20Request(JSONRPCBaseRequest):
45
JSONRPC_VERSION = "2.0"
46
REQUIRED_FIELDS = set(["jsonrpc", "method"])
47
POSSIBLE_FIELDS = set(["jsonrpc", "method", "params", "id"])
48
+ CUSTOM_RPC_INTERNALS = set(["rpc.discover"])
49
50
@property
51
def data(self):
@@ -71,7 +72,7 @@ def method(self, value):
71
72
if not isinstance(value, six.string_types):
73
raise ValueError("Method should be string")
74
- if value.startswith("rpc."):
75
+ if value.startswith("rpc.") and value not in self.CUSTOM_RPC_INTERNALS:
76
raise ValueError(
77
"Method names that begin with the word rpc followed by a " +
78
"period character (U+002E or ASCII 46) are reserved for " +
0 commit comments