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

Support for dockerized RPC clients + Hostname resolution when attaching to RPC clients #972

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

mariuspod
Copy link
Contributor

@mariuspod mariuspod commented Feb 24, 2021

What I did

I've extended the check that is determining if a RPC client is already running to also query the network connections in addition to the process list. The error I've observed on a Ubuntu 18.04 LTS was that only localhost RPC clients could be detected with the existing code. Even dockerized RPC clients bound to the 127.0.0.1 could not be attached.

How I did it

I've adapted the logic to first try the process list and then the network connections.
I've also implemented hostname resolution which becomes handy when the RPC client is bound to a specific hostname instead of IP which is often the case when used in docker-compose environments.

How to verify it

docker run -p 8545:8545 trufflesuite/ganache-cli

Then in another terminal

brownie console

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

@iamdefinitelyahuman
Copy link
Member

I think this fixes #371

Copy link
Member

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks for your contribution

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.

2 participants