-
Notifications
You must be signed in to change notification settings - Fork 21.5k
console: use default APIs when server doesn't have rpc_modules #26267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
MariusVanDerWijden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, -32601 is the MethodNotFound error right? Could you document that, so it's easier to understand?
|
Just out of curiosity in what situation do you need this? i.e. when is |
|
The error happens with |
| return err | ||
| } | ||
|
|
||
| var defaultAPIs = map[string]string{"eth": "1.0", "net": "1.0", "debug": "1.0"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove debug since it's not exposed by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave as much as possible -- even if it's not enabled. If we don't know whether it's enabled or not, at least we can leave it up to the user to figure out. Otherwise we'll basically deny access, with no way to enable it, and no way for the end-user to test if it works or not.
s1na
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change was already proposed in #25148, but that PR got closed for some reason. I recently needed this functionality myself, so here we go again.