-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
add ipc client #2791
add ipc client #2791
Conversation
Pull Request Test Coverage Report for Build 3892e464-8dda-4f07-a0c1-f549e2c739e5
💛 - Coveralls |
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.
Just a couple of comments
|
||
response = :gen_tcp.connect({:local, state[:path]}, 0, opts) | ||
|
||
case response do |
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 think this could be handled using a with
else | ||
{:error, %Jason.DecodeError{data: ""}} -> {:error, :empty_response} | ||
{:error, error} -> {:error, {:invalid_json, error}} | ||
{:error, error} -> {:error, error} |
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 think this last clause never matches, because the one just above is the same and takes precedence.
Another atom in the tuple should allow you to separate them.
Resolves #2790
docs update blockscout/docs#2
Two env variables should be set
ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT=ipc
andIPC_PATH=path_to_ipc
Changelog