Skip to content
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

Merged
merged 11 commits into from
Oct 29, 2019
Merged

add ipc client #2791

merged 11 commits into from
Oct 29, 2019

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Oct 21, 2019

Resolves #2790

docs update blockscout/docs#2

Two env variables should be set ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT=ipc and IPC_PATH=path_to_ipc

Changelog

  • add ipc client

@ayrat555 ayrat555 changed the title add ipc client [WIP] add ipc client Oct 21, 2019
@coveralls
Copy link

coveralls commented Oct 21, 2019

Pull Request Test Coverage Report for Build 3892e464-8dda-4f07-a0c1-f549e2c739e5

  • 2 of 19 (10.53%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 76.6%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/ipc.ex 0 17 0.0%
Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/fetcher/replaced_transaction.ex 2 90.91%
Totals Coverage Status
Change from base Build 2afb100c-ab3c-44d0-9d7d-8b6d646b7cfe: -0.2%
Covered Lines: 5290
Relevant Lines: 6906

💛 - Coveralls

@ayrat555 ayrat555 changed the title [WIP] add ipc client add ipc client Oct 22, 2019
Copy link
Contributor

@pasqu4le pasqu4le left a 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
Copy link
Contributor

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}
Copy link
Contributor

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.

@vbaranov vbaranov merged commit 66058cf into master Oct 29, 2019
@vbaranov vbaranov deleted the ab-ipc-client branch October 29, 2019 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support of IPC transport
4 participants