Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Make the behaviour in libp2p generic #2525

Merged
merged 6 commits into from
May 13, 2019

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented May 9, 2019

This slightly changes the hierarchy of the structs in network-libp2p.

Instead of Service <-> Behaviour <-> CustomProto, we now have Service <-> Behaviour<CustomProto>.
The Service builds the CustomProto and passes it to Behaviour, instead of having Behaviour build the CustomProto itself.

There's not fundamental reason for this change alone. I started working on a much bigger change to make network-libp2p entirely generic over the protocol (which is necessary for example for Ethereum 2.0 support), but then realized I was blocked. Since I have already done this part, I might as well submit it as PR. I will do the bigger change in the future.

@tomaka tomaka added the A0-please_review Pull request needs code review. label May 9, 2019
@gavofyork gavofyork requested a review from arkpar May 10, 2019 12:17
@arkpar arkpar added A8-looksgood and removed A0-please_review Pull request needs code review. labels May 12, 2019
@gavofyork gavofyork merged commit a0931f3 into paritytech:master May 13, 2019
@tomaka tomaka deleted the libp2p-generic branch May 13, 2019 19:40
MTDK1 pushed a commit to bdevux/substrate that referenced this pull request Jul 10, 2019
* Make the behaviour in libp2p generic

* Fix indentation

* Fix bad merge
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants