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

Trio: fix host, peer, protocols, and examples #398

Closed

Conversation

mhchia
Copy link
Contributor

@mhchia mhchia commented Jan 19, 2020

Part of the #365:

  • Host
  • PeerInfo
  • Protocol muxer
  • Examples

@mhchia mhchia mentioned this pull request Jan 19, 2020
@mhchia mhchia changed the base branch from master to feature/trio January 19, 2020 15:00
Copy link
Contributor

@ChihChengLiang ChihChengLiang left a comment

Choose a reason for hiding this comment

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

Looks good

examples/chat/chat.py Show resolved Hide resolved
muxer_opt: TMuxerOptions = None,
sec_opt: TSecurityOptions = None,
peerstore_opt: IPeerStore = None,
) -> Swarm:
) -> INetworkService:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we changing to a more abstract type to the function output here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I intended to use interfaces over implementations. I can change it back if you think it's more reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Using interfaces sounds good 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. This has helped us a lot in both the trinity and py-evm codebases to establish concrete interface definitions and to use them ubiquitously in our type hints.

@mhchia
Copy link
Contributor Author

mhchia commented Feb 6, 2020

Closed by #365

@mhchia mhchia closed this Feb 6, 2020
@mhchia mhchia deleted the feature/trio-host-peer-protocol branch February 6, 2020 02:15
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.

None yet

3 participants